To send a push notification that opens a deep link, pass the deep link in the link parameter of your request and disable link shortening with minimize_link:
{
"request": {
"application": "XXXXX-XXXXX",
"auth": "YOUR_API_TOKEN",
"notifications": [
{
"send_date": "now",
"content": "Check out our new collection",
"link": "myapp://products/42",
"minimize_link": 0
}
]
}
}
-
link — the deep link to open. Use your app's own URI scheme (for example
myapp://products/42) or a deep link you configured in Settings → Deep Links. A plainhttps://address here opens the browser, not your app, unless it is registered as an App Link / Universal Link. -
minimize_link — controls URL shortening. The default is 2 (shorten via bitly), which breaks custom-scheme deep links, so you must set it to 0 whenever the
linkvalue is a deep link. Note that shorteners also have call-rate restrictions.
Important! A deep link will not work correctly without "minimize_link": 0.
Before sending, make sure the deep link is actually handled on the device — the URI scheme (or App Link / Universal Link) must be declared in the app and routed to the right screen. See Deep linking.
The example above uses the /createMessage endpoint of the Messages API. For new integrations consider Messaging API v2, which is the current sending API.
Comments
0 comments
Please sign in to leave a comment.