post https://api.sumsub.com/resources/sdkIntegrations/levels/-/websdkLink
Overview
Use this method to generate an external link (permalink) to the WebSDK for a specific applicant.
Optionally, you can define post-verification redirect behavior by including the redirect
parameter in the request. This allows you to specify custom URLs for successful or failed verification outcomes.
Request examples
curl -X POST \
'https://api.sumsub.com/resources/sdkIntegrations/levels/-/websdkLink' \
-H 'content-type: application/json' \
-d '{
"levelName": "level-name",
"userId": "cool-external-user-id",
"applicantIdentifiers": {
"email": "[email protected]",
"phone": "+4400000000000"
},
"redirect": {
"successUrl": "https://website/zdf;jzgxhd;fibzh;dfihb;kdsh;vzu?status=ok",
"rejectUrl": "https://website/zdf;hzidxh54o8yw49ah489gh;drughr?status=reject",
"signKey" : "dzihgsiKUH786769p",
"allowedQueryParams": [
"param1",
"param2",
"param3",
"param4"
]
},
"ttlInSecs": 1800
}'
curl -X POST \
'https://api.sumsub.com/resources/sdkIntegrations/levels/-/websdkLink' \
-H 'content-type: application/json' \
-d '{
"levelName": "action-level-name",
"userId": "cool-external-user-id",
"externalActionId": "86893ec9-d48c-496a-9f72-69e272ac84e9",
"ttlInSecs": 3600
}'
Response explained
In the response, you will get a new link to the WebSDK.
The following is a response example in case the request is sent and processed correctly:
{
"url":"http://localhost:8092/websdk/p/7JwtC0pb9mcqQsLb"
}
If the request fails, you will receive an HTTP response containing an error code along with a message explaining the error. For example:
{
"description": "Request signature mismatch",
"code": 401,
"correlationId": "c0b20cfbbf674ce5aeaf479e72d33af8",
"errorCode": 4003,
"errorName": "app-token-signature mismatch"
}