Retrieve Deferred Deep Links from API

If you append parameters (such as referral codes, campaign IDs, and publisher-specific parameters) to your deferred deep links, then you can make server-to-server API calls to the TUNE API to programmatically retrieve the actual deep link URL that MAT persists in its internal deep link database/registry. This retrieval can be useful for double-checking the parameters appended to the deep link URL, or simply for testing and debugging purposes to see the specific deep link URL that MAT will serve at run-time (ad click).

All requests to the deferred deep link API must be authenticated as described at Authentication Method for SDK-less use of Measurement API. Instead of making API calls from your server, you can also retrieve deferred deep links using the MAT SDK (integrated with your app code), as described in Reading Server Responses.

To retrieve a deferred deep link from API:

Generate an HTTPS request to the following service endpoint:

Include your authentication signature and other required parameters in the request header:

Header Parameter Description
MAT-Consumer-Key The consumer key corresponding to the API key used to generate the signature.
MAT-Timestamp A POSIX timestamp in seconds; must be within 60 seconds of the current time.
MAT-Signature The API request signature.

Append your other query parameters to the request:

Query Parameter Description
advertiser_id (required) The unique ID of the account displayed in the MAT platform.
platform (required) The name of the platform or OS running on the mobile device (typically iOS, Android, or Windows).
package_name (required) The package name for the Android app (or bundle ID for the iOS app), which must match the value specified for the mobile app in your MAT account.
device_ad_id (required) The device identifier (such as the “ios_ifa” or “google_aid” value) for which to retrieve the deferred deep link.
device_ip (optional) The IP address of the device on click.

Now URL encode all of the query parameters.

The following example shows a URL-encoded API request:

$ curl -X GET -h"Mat-Consumer-Key: aaaabbbbccccddddeeeeffff" -h"Mat-Timestamp: 1430951160" -h"Mat-Signature: xxxxxxxxxxxxxxxxxxxxxxxx" ""

Sending this URL-encoded API request generates the following sample response from the deep linker service:

"link": "myapp://page?mat_click_id=1111222233334444-20150427-877"

The possible response values are:

HTTP Status Code Response Body
Success 200 OK JSON blob with element “link”, which contains the deep link URL.
Error 4XX or 5XX JSON blob with element “message”, which contains the error message.

Things to Keep in Mind

  • NEVER pass personally identifiable information (PII) through a deferred deep link because it poses a security risk. For more information about safeguarding sensitive data, please visit Handling User Information.
  • In Web-to-App scenarios, TUNE uses device fingerprint matching to lookup deferred deep links because presumably, the original click did not have a device identifier. TUNE imposes a lookback window of 2 hours (instead of the default 24-hour attribution window for device fingerprint matching) to reduce the likelihood of false matches. Because device fingerprint matching is not always 100% accurate, you should NOT pass PII through a deferred deep link (else it’s remotely possible that users may receive targeted information unintended for them).
  • If TUNE cannot match the user/device to a deferred deep link through device fingerprint matching, then TUNE does not redirect the user through the deferred deep link. Be aware of the potential for drop-off.

For more information about deep linking, please visit Deep Linking to Your Mobile App from Your Website.

Have a Question? Please contact for technical support.