redirect_link= param that lets Phantom know how to get back to the original app. The URI specified by this param should be URL encoded.
If the deeplink request to Phantom comes with a response, Phantom will append the results as query parameters in the redirect_link= upon redirecting.
Redirect link types
You can use either HTTPS URLs or custom scheme URIs forredirect_link, but each has different behavior:
HTTPS URLs
When using an HTTPS URL (e.g.,https://yourapp.com/callback):
- App metadata displays correctly: Logo, title, and favicon are fetched and shown in the connection approval dialog
- Opens in browser: The redirect opens in the mobile browser instead of redirecting back to your app
Custom scheme URIs
When using a custom scheme URI (e.g.,mydapp://onPhantomConnected):
- Redirects back to app: Properly redirects back to your mobile app
- No app metadata: Logo, title, and favicon are not displayed in the connection approval dialog
Choosing a redirect link type:
- Use HTTPS URLs if displaying your app’s branding in the connection dialog is important, but be aware that users will be redirected to the browser instead of your app.
- Use custom scheme URIs if seamless app redirection is critical, but note that your app’s branding will not appear in the connection dialog.