> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dashlink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Receive Dynamic Links

> Optional SDK versus JSON resolve. Routing works without an SDK; deferred first-open recovery does not.

App Dynamic Links combine two behaviors behind one URL: open an already-installed app, and recover the original destination after a store install.

| Situation | No SDK | With Android / iOS SDK |
| - | - | - |
| App installed, host in the manifest / Associated Domains, OS verified | OS opens the app with the **short URL**. Parse it, or call JSON resolve. | SDK intercepts, JSON-resolves, navigates to `app_url`, emits `app_open`. |
| App installed, host **not** declared | Browser → Play / App Store. The edge cannot see install state. | Same, until the next app release adds the host. |
| App not installed, Android | 302 to Play. Click is `store_redirect`. After install: home screen, no join. | 302 to Play with `referrer=` carrying the short URL + `click_id`. First open: Play Install Referrer → `app_url`, `deferred_open` **joined to that `click_id`**. Empty referrer → `deferred_miss`. |
| App not installed, iOS | Interstitial then App Store. After install: home screen, no join. | Interstitial copies the short URL + `click_id` to the pasteboard, then App Store. First open: pasteboard → `app_url`, `deferred_open` joined to that click. Empty/foreign pasteboard → `deferred_miss`. iOS 14+ may show a paste banner once. |
| Desktop / bot | Web destination / OG preview. | Same. |

The native SDK is **required** for deferred deep linking and for joining the store tap to first open. It is **not** required for the OS to open an already-installed app. SDK JSON resolve (and any hand-rolled `format=json` client) must send a Dynamic Link API key. Browser 302s do not.

With the SDK, a Dynamic Link that sends a user through the store recovers `app_url` on first open and joins that open to the same `click_id` as the store tap.

## Association (always)

Dashlink hosts `assetlinks.json` and the Apple association file on the Dynamic Link domain. The app must still declare that host. See [App association](https://docs.dashlink.ai/guides/app-dynamic-links/app-association.md).

## JSON resolve (any client)

When the OS delivers the short URL, or after the SDK recovers it from Play referrer / pasteboard:

```bash theme={null}
curl "https://yourbrand.dshl.in/Ab12Cd?format=json&platform=android" \
  -H "X-API-Key: dlk_sdk_…"
```

JSON resolve that writes tracking requires a **Dynamic Link** API key (`dlk_sdk_…`, header only). REST keys (`dlk_live_`) are rejected. Browser 302s stay public. A 401 means the key is missing, wrong kind, revoked, expired, or bound to another organization — no `app_open` / `deferred_open` is published. Replay of the same `click_id` still returns `app_url` but does not publish a second `deferred_open`.

Optional query (the SDKs send these):

| Param | Values |
| - | - |
| `platform` | `android` \| `ios` |
| `deferred` | `0` \| `1` |
| `match` | `direct` \| `referrer` \| `pasteboard` |
| `click_id` | Opaque id from `dl_cid` on the store tap |
| `sdk` | `android` \| `ios` |
| `sdk_version` | Semver |
| `first_open` | `0` \| `1` |

The body keeps `app_url`, `destination_url`, `fallback_url`, `outcome`, `platform`, and adds `click_id`, `is_deferred`, `match_type`, and UTM fields. `outcome` is `app_open`, `deferred_open`, or `deferred_miss`. JSON resolve never 302s to the store.

The store 302 is the **click**. `deferred_open` is an outcome on that same `click_id`, not a second campaign click.

## SDKs

Install, lifecycle, deferred recovery, and tracking join live on the platform pages. This page stays the routing vs deferred map and the JSON resolve contract. Sample apps and changelogs stay in the GitHub repos.

| Platform | Guide | Install |
| - | - | - |
| Android | [Android SDK](https://docs.dashlink.ai/guides/app-dynamic-links/android.md) | Gradle `implementation("ai.dashlink:dashlink-android:1.0.0")` (see repo until Maven Central publish) |
| iOS | [iOS SDK](https://docs.dashlink.ai/guides/app-dynamic-links/ios.md) | Swift Package Manager or CocoaPods `pod 'Dashlink', '~> 1.0.0'` |
| React Native | [React Native SDK](https://docs.dashlink.ai/guides/app-dynamic-links/react-native.md) | npm `@dashlink/react-native`. Forward live URLs from `Linking` into `handleUniversalLink`. `getDynamicLink()` is the startup deferred check. Association stays native. |
| Flutter | [Flutter SDK](https://docs.dashlink.ai/guides/app-dynamic-links/flutter.md) | pub `dashlink: ^1.0.0`. Forward the app-links stream into `handleUniversalLink`. `getDynamicLink()` is the startup deferred check. Association stays native. |
| Unity | [Unity SDK](https://docs.dashlink.ai/guides/app-dynamic-links/unity.md) | Android and iOS player builds call the native SDKs. Editor, Windows, macOS, and console builds return no link. |
| Unreal Engine | [Unreal SDK](https://docs.dashlink.ai/guides/app-dynamic-links/unreal.md) | Android and iOS packages call the native SDKs. Editor and desktop builds return an empty link. |

All clients need a **Dynamic Link** API key (`dlk_sdk_…`) from Settings → API Keys before `configure` / `getDynamicLink`. See [API keys](https://docs.dashlink.ai/guides/api-keys.md).

* **Android** — `Dashlink.configure` then `getDynamicLink`; deferred via Play Install Referrer. See [Android SDK](https://docs.dashlink.ai/guides/app-dynamic-links/android.md).
* **iOS** — `DynamicLinks.configure`, `handleUniversalLink`, and `performDeferredCheckIfNeeded`; deferred via pasteboard. See [iOS SDK](https://docs.dashlink.ai/guides/app-dynamic-links/ios.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.