Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization
header as Bearer TOKEN
.https://sandbox.surepass.app
https://kyc-api.surepass.app
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token for authentication. Format: Bearer {jwt_token} |
Content-Type | Yes | Must be set to application/json |
Parameter | Type | Required | Description |
---|---|---|---|
data.prefill_options | Object | No | User information to prefill in the DigiLocker form |
data.prefill_options.full_name | String | No | User's full name to prefill (max 250 characters) |
data.prefill_options.mobile_number | String | No | User's mobile number to prefill |
data.prefill_options.user_email | String | No | User's email address to prefill |
data.signup_flow | Boolean | Yes | Set to true for new users (they must provide a PIN during registration). Set to false for existing DigiLocker users (proceeds with login). |
data.auth_type | String | No | Authentication type: 'web' or 'app' (default: 'web') |
data.verify_phone | Boolean | No | Whether to verify user's phone number (default: false) |
data.verify_email | Boolean | No | Whether to verify user's email address (default: false) |
data.allow_selection | Boolean | No | Allow document selection (readonly, default: false) |
data.redirect_url | String | No | URL to redirect user after DigiLocker authentication |
data.webhook_url | String | No | Webhook URL for callbacks |
data.state | String | No | Custom state parameter for session tracking (max 100 characters) |
data.local_frontend_url | String | No | Local frontend URL |
data.aadhaar_xml | Boolean | No | Enable Aadhaar XML format (default: false) |
data.send_sms | Boolean | No | Send SMS notifications (requires mobile_number, default: false) |
data.send_email | Boolean | No | Send email notifications (requires user_email, default: false) |
data.expiry_minutes | Integer | No | Session expiry time in minutes (default: 30, min: 5, max: 30) |
data.voice_assistant | Boolean | No | Enable voice assistant (default: false) |
data.voice_assistant_lang | String | No | Voice assistant language: 'hi', 'en', or 'both' (default: 'en') |
data.retry_count | Integer | No | Number of retry attempts (default: 1, min: 1, max: 5) |
data.skip_main_screen | Boolean | No | Skip main screen display (default: false) |
data.logo_url | String | No | Custom logo URL |
{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com"
}
}
{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com",
"webhook_url": "https://webhook.site/a6f4fcec-5ac8-4c82-96ea-7eded59fd59a"
}
}
Parameter | Type | Description |
---|---|---|
data.client_id | String | Unique identifier for the DigiLocker session |
data.token | String | Authentication token for the session |
data.url | String | DigiLocker OAuth URL where the user should be redirected |
data.expiry_seconds | Integer | Session expiry time in seconds |
status_code | Integer | HTTP status code of the response |
message_code | String | Status message code |
message | String | Human-readable status message |
success | Boolean | Indicates if the request was successful |
{
"data": {
"client_id": "digilocker_puWsFhgqyuEpEdEWkxzm",
"token": ".eJyrVkrOyUzNK4nPTFGyUkrJTM_MyU_OTi2KLygNL3bLSC-sLHUtcE1xDc-uqMpV0lFKTyxJLU-sBKotTsxLScqvAIqVVBakomhWqgUAeUcfZQ.ZfRPLA.61lSxiyFrRnRA_gO3XrVunVeGMs",
"url": "https://digilocker-sdk.notbot.in/?gateway=sandbox&type=digilocker&token=.eJyrVkrOyUzNK4nPTFGyUkrJTM_MyU_OTi2KLygNL3bLSC-sLHUtcE1xDc-uqMpV0lFKTyxJLU-sBKotTsxLScqvAIqVVBakomhWqgUAeUcfZQ.ZfRPLA.61lSxiyFrRnRA_gO3XrVunVeGMs&auth_type=web",
"expiry_seconds": 600
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}
Note: This is the response sent to your webhook URL, not the API response.
{
"client_id": "digilocker_lbsfmoudALfjHnrowLCl",
"status": "success",
"type": "digilocker"
}
{
"status_code": 401,
"message_code": "unauthorized",
"message": "Invalid or expired authentication token",
"success": false
}
curl --location --request POST 'https://kyc-api.surepass.app/api/v1/digilocker/initialize' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com"
}
}'
{
"data": {
"client_id": "digilocker_puWsFhgqyuEpEdEWkxzm",
"token": ".eJyrVkrOyUzNK4nPTFGyUkrJTM_MyU_OTi2KLygNL3bLSC-sLHUtcE1xDc-uqMpV0lFKTyxJLU-sBKotTsxLScqvAIqVVBakomhWqgUAeUcfZQ.ZfRPLA.61lSxiyFrRnRA_gO3XrVunVeGMs",
"url": "https://digilocker-sdk.notbot.in/?gateway=sandbox&type=digilocker&token=.eJyrVkrOyUzNK4nPTFGyUkrJTM_MyU_OTi2KLygNL3bLSC-sLHUtcE1xDc-uqMpV0lFKTyxJLU-sBKotTsxLScqvAIqVVBakomhWqgUAeUcfZQ.ZfRPLA.61lSxiyFrRnRA_gO3XrVunVeGMs&auth_type=web",
"expiry_seconds": 600
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}