Resolve the link that opened the app
POST/api/links/resolve
Takes the URL that opened the app, either a universal link or app link or, on Android, the link value from the Play install referrer, and returns the link's id, longUrl and shortUrl. Records a click. A URL that isn't one of the app's links answers 404. A sandbox link's response carries isSandbox: true; other links' responses don't have the field.
Request
Send your app’s API key in the Api-Key header. See Authentication.
Body
urlstringrequired
The URL that opened your app: a universal link or app link, or on Android the link value from the Play install referrer.
at least 1 character
Response
200 with this body. For errors, see Errors.
idinteger
The link’s id.
longUrlstring or null
The link’s full URL. Route your app by its path and query.
shortUrlstring or null
The link’s short URL.
isSandboxboolean
true for a sandbox link. Live links’ responses leave the field out.
{
"id": 1001,
"longUrl": "https://demo.dev.thedbl.ink/products/1234",
"shortUrl": "https://demo.dev.thedbl.ink/Xy3kP9aQ"
}Example
curl -X POST 'https://dev.thedbl.ink/api/links/resolve' \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://demo.dev.thedbl.ink/Xy3kP9aQ"
}'Try it
Sends a real request to https://dev.thedbl.ink from your browser. Use your app’s sandbox API key, which starts with sandbox_, while you try things out. Each call records a click on the link.
https://dev.thedbl.ink/api/links/resolve