Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization header as Bearer TOKEN.https://sandbox.surepass.apphttps://kyc-api.surepass.app| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token (JWT) for API authentication |
| Content-Type | Yes | Must be 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 | Yes | Authentication type - must be set to "app" for SDK integration (default: 'app') |
| 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 receiving verification callbacks |
| data.state | String | No | Custom state parameter for tracking the session (max 100 characters) |
| data.local_frontend_url | String | No | Local frontend URL for development purposes |
| data.aadhaar_xml | Boolean | No | Whether to include Aadhaar XML data (default: false) |
| data.send_sms | Boolean | No | Whether to send SMS notifications to user (default: false) |
| data.send_email | Boolean | No | Whether to send email notifications to user (default: false) |
| data.expiry_minutes | Integer | No | Session expiry time in minutes (min: 5, max: 30, default: 30) |
| data.voice_assistant | Boolean | No | Enable voice assistant feature (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 allowed (min: 1, max: 5, default: 1) |
| data.skip_main_screen | Boolean | No | Skip the main introduction screen (default: false) |
| data.logo_url | String | No | Custom logo URL for branding |
{
"data": {
"signup_flow": true,
"auth_type": "app",
"logo_url": "https://yourcompany.com/logo.png",
"voice_assistant_lang": "hi",
"voice_assistant": true,
"retry_count": 3,
"skip_main_screen": false
}
}{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com",
"webhook_url": "https://webhook.site/a6f4fcec-5ac8-4c82-96ea-7eded59fd59a"
}
}| Parameter | Type | Description |
|---|---|---|
| data | object | Contains session credentials for SDK initialization |
| data.client_id | string | Unique client identifier for the session |
| data.token | string | JWT token for SDK initialization (expires in 10 minutes) |
| data.expiry_seconds | number | Token validity duration in seconds (default: 600) |
| status_code | integer | HTTP status code (200 for success) |
| message_code | string | Status message code ("success" on success) |
| message | string | Human-readable status message |
| success | boolean | Indicates if the request was successful |
{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"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": "invalid_token",
"message": "The provided token is invalid or expired.",
"success": false
}skip_main_screen to streamline the onboarding flow if your UX requires it.| Environment | Base URL | Usage |
|---|---|---|
| UAT (Testing) | https://sandbox.surepass.app | For development and testing |
| Production | https://kyc-api.surepass.app | For live applications |
| Parameter | Type | Required | Description | Default Value |
|---|---|---|---|---|
signup_flow | boolean | ✅ Required | This parameter should always be true for SDK initialization | true |
logo_url | string | ❌ Optional | Your branding logo URL - customize with your own logo | None |
voice_assistant_lang | string | ❌ Optional | Voice assistant language. Possible options: "en" (English), "hi" (Hindi) | "en" |
voice_assistant | boolean | ❌ Optional | Enable/disable voice assistant functionality | false |
retry_count | integer | ❌ Optional | Number of allowed retries during dropout prevention | 2 |
skip_main_screen | boolean | ❌ Optional | Whether to show the first intro screen or skip it | true |
{
"data": {
"signup_flow": true
}
}{
"data": {
"signup_flow": true,
"logo_url": "https://yourcompany.com/logo.png",
"voice_assistant_lang": "hi",
"voice_assistant": true,
"retry_count": 3,
"skip_main_screen": false
}
}{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}token value - you'll need this for Step 3!client_id if needed for tracking purposesread:packages (Download packages from GitHub Package Registry)repo (Full control of private repositories) - if neededsettings.gradle:build.gradle (app level):colors.xml:res/values/colors.xml<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="background_color">#B82C5A</color>
<!-- Add this line to customize Digiboost SDK theme -->
<color name="surepass_color">#FF9800</color> <!-- Replace with your brand color -->
</resources>settings.gradleread:packages permissionminSdk is set to 26 or higherbuild.gradle accordinglyonCreate completescurl --location --request POST 'https://kyc-api.surepass.app/api/v1/digilocker/initialize' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": {
"signup_flow": true,
"auth_type": "app",
"logo_url": "https://yourcompany.com/logo.png",
"voice_assistant_lang": "hi",
"voice_assistant": true,
"retry_count": 3,
"skip_main_screen": false
}
}'{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}