Configure consent notifications
You can declare a preferred notification channel for your users and configure how your consent notifications appear.
Please note that if you're using Swan's Web Banking interface, Swan sends a text message to your users for one-time passwords, logins, and consents, regardless of preferred channel and configuration.
Your integration has three seconds to respond to a consent notification. If your response is anything other than a 200 OK HTTP, or there's no response at all, Swan cancels the consent and redirects your user.
Declare preferred notification channel​
You can specify how your user would like to receive consent notifications, referred to as their preferred channel.
- Call the
updateUserConsentSettings
mutation with a project access token. - Enter the user's
userId
. - Choose the preferred channel:
Sms
(default value): Swan sends a text message to the user with the SCA link to open on their mobile device.App
: You receive a notification, then send the SCA link to your user yourself.
Mutation​
🔎 Open the mutation in API Explorer
mutation PreferredChannel {
updateUserConsentSettings(
input: {
userId: "$YOUR_USER_ID"
preferredNotificationChannel: Sms
}
) {
... on UpdateUserConsentSettingsSuccessPayload {
__typename
userConsentSettings {
preferredNotificationChannel
}
}
... on UpdateUserConsentSettingsTokenRejection {
__typename
message
}
}
}
Payload​
Notice the preferred channel Sms
(line 6).
{
"data": {
"updateUserConsentSettings": {
"__typename": "UpdateUserConsentSettingsSuccessPayload",
"userConsentSettings": {
"preferredNotificationChannel": "Sms"
}
}
}
}
Configure consent notification​
Configure your consent notification on your Dashboard.
- Go to Dashboard > Developers > Consent notification.
- Enter your endpoint, secret key, accent color, and logo.
- Click Save.
Along with a notification, you'll receive an authorizationUrl
and the consent
object to display to your user on their mobile.
On desktop, Swan displays the consentUrl
.
While consent is ongoing, the user's mobile plays a repeated image with your accent color and logo.