WarpLink
SDKsReact Native

API Reference

The complete TypeScript API reference for the WarpLink React Native SDK: initialization, deep link events, and attribution.

The main entry point. Exported from @warplink/react-native.

configure(options)

Initialize the SDK. The key format is validated synchronously; the returned promise resolves after native configuration completes, including the automatic cold-start and deferred deep link dispatch.

ParameterTypeDescription
optionsWarpLinkConfigConfiguration with your SDK key, the onLink callback, and optional settings.

When onLink is set, configure() wires getInitialDeepLink (cold start), onDeepLink (warm start), and checkDeferredDeepLink (deferred) into that single callback. Disambiguate the deferred case with isDeferred. Set automaticDeepLinks or automaticDeferredDeepLinks to false to disable either piece.

Does not throw. A malformed SDK key is reported through your onLink callback as an { error } event with code E_INVALID_API_KEY_FORMAT, and always logs a warning. The SDK stays unconfigured. iOS and Android behave the same way.

handleDeepLink(url)

Resolve a deep link URL to its link data.

Errors: E_NOT_CONFIGURED, E_INVALID_URL, E_LINK_NOT_FOUND, E_NETWORK_ERROR, E_SERVER_ERROR, E_INVALID_API_KEY, E_DECODING_ERROR

Check for a deferred deep link on first launch. Returns null if no match found. On subsequent launches, returns the cached result.

"First launch" means the first launch of the current install. A reinstall is a new install and runs the check again, with is_reinstall set on the request. See App Reinstall.

Errors: E_NOT_CONFIGURED, E_NETWORK_ERROR, E_SERVER_ERROR, E_INVALID_API_KEY, E_DECODING_ERROR

getAttributionResult()

Get install attribution data. Returns null if no attribution match found.

isConfigured()

Check whether the SDK has been configured.

onDeepLink(listener)

Register a listener for warm-start deep link events. Returns an unsubscribe function.

Get the deep link that launched the app (cold start). Returns null if not launched via a link.


Types

WarpLinkConfig

The match window is server-side (set per link in the dashboard), so there is no matchWindowHours option.

linkDomains

Hosts the SDK should treat as yours, in addition to aplnk.to. configure() forwards the list to the native SDKs, which own the domain set and the normalization (trimmed, lowercased, a full URL reduced to its host). Declaring a custom domain here is what lets a link on it resolve on the first launch, before the SDK has reached the server. The same domains can be declared natively instead: see iOS and Android.

AttributionResult

DeepLinkEvent

Discriminated union: exactly one of deepLink or error is present.

DeepLinkListener


Error Types

WarpLinkError

ErrorCodes

CodeDescription
E_NOT_CONFIGUREDSDK not initialized.
E_INVALID_API_KEY_FORMATKey format invalid.
E_INVALID_API_KEYKey rejected by server.
E_NETWORK_ERRORNetwork unreachable or timeout.
E_SERVER_ERRORServer returned 5xx.
E_INVALID_URLNot a recognized WarpLink domain.
E_LINK_NOT_FOUNDLink not found or inactive.
E_DECODING_ERRORMalformed server response.

On this page