Multipass
Initiating App Link
The following describes how to create your app link to Multipass within your application.
Create App Link
To create your app link you will need your:
- API key generated in the developer portal 🔗
- Your template ID created in the dev portal
- Finally, your external Opacity API endpoint
https://mobile-api.opacity.network/api/app-links/create
// Generate a random ID example for metadata
const randomId = Math.random().toString(36).substring(2, 10)
// Add your API key and template ID to the body of the request
const response = await fetch(
`https://mobile-api.opacity.network/api/app-links/create`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
apiKey: 'YOUR API KEY',
templateId: 'YOUR TEMPLATE ID',
metadata: {
randomId,
},
// Metadata is optional. Add any parameters you would like to supply to your backend.
}),
},
)
Note Any provided metadata is included when a user response is complete and sent to your aforementioned Webhook URL
provided in the dev portal template section.
On success an Opacity Multipass URL link is returned to you and your user can begin connecting the requested flow based off this template.
The following displays your response and Multipass page your user will be redireced to.
data: {
id: 'decd02ad-075d-4c6b-932f-8c24eaf7c6fe',
shortCode: '302543',
url: 'https://multipass.opacity.link/decd02ad-075d-4c6b-932f-8c24eaf7c6fe'
}
Next
The next section is a guide through your user experience once an app link has been initiated.