Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization header as Bearer YOUR_JWT_TOKEN.https://sandbox.surepass.app (for development and testing)https://kyc-api.surepass.app (for live applications)| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token (JWT) for API authentication. Format: Bearer YOUR_JWT_TOKEN |
| Content-Type | Yes | Must be set to application/json for JSON request bodies |
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Object | Yes | Container object for all initialization parameters |
| data.signup_flow | Boolean | Yes | Determines the DigiLocker flow type. Set to true for new users (they must provide a PIN during registration). Set to false for existing DigiLocker users (proceeds with login flow) |
| data.auth_type | String | Yes | Authentication type for SDK integration. Must be set to "app" for Flutter SDK integration |
{
"data": {
"signup_flow": true,
"auth_type": "app"
}
}{
"data": {
"signup_flow": true,
"auth_type": "app",
"webhook_url": "https://api.yourcompany.com/webhooks/digilocker/callback",
"state": "user_session_12345",
"send_email": true
}
}| Parameter | Type | Description |
|---|---|---|
| data | Object | Container object for session credentials and initialization parameters |
| data.client_id | String | Unique client identifier for the DigiLocker session. Use this for tracking and reference |
| data.token | String | JWT token required for Flutter SDK initialization. This token expires in 10 minutes (600 seconds) |
| data.expiry_seconds | Number | Token validity duration in seconds. Typically 600.0 (10 minutes) |
| status_code | Integer | HTTP status code indicating request outcome (200 for successful requests) |
| message_code | String | Machine-readable status code. Returns "success" for successful initialization |
| message | String | Human-readable status message providing context about the request result |
| success | Boolean | Boolean flag indicating whether the request was processed successfully |
{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJkaWdpbG9ja2VyX2NudFdwTXhXSGJjdmdnaHR5dnh3IiwiZXhwIjoxNzM3MjA2NDAwfQ.sampleSignatureHash",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}Note: This is the asynchronous response sent to your configured webhook URL after the user completes the DigiLocker authentication flow. This is separate from the API initialization response.
{
"client_id": "digilocker_lbsfmoudALfjHnrowLCl",
"status": "success",
"type": "digilocker",
"timestamp": "2026-01-17T10:30:45Z"
}{
"status_code": 401,
"message_code": "invalid_token",
"message": "The provided authorization token is invalid or has expired",
"success": false
}Bearer YOUR_JWT_TOKEN.skip_main_screen parameter strategically based on your onboarding flow complexity and user familiaritypubspec.yaml file:<USERNAME> and <PAT> with your GitHub username and Personal Access Token.Info.plistdigilocker-flutter-sample/
├── lib/
│ └── main.dart # Main application code
├── android/ # Android configuration
├── ios/ # iOS configuration
├── assets/ # App assets
└── pubspec.yaml # Dependenciesflutter pub get to fetch dependencies| Environment | Base URL | Purpose | Token Validity |
|---|---|---|---|
| Sandbox (UAT) | https://sandbox.surepass.app | Development, testing, and integration | 10 minutes (600 seconds) |
| Production | https://kyc-api.surepass.app | Live production applications | 10 minutes (600 seconds) |
client_id for session tracking, analytics, and support purposes. This identifier can be used to query session status via other APIs.curl --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"
}
}'{"data": null, "error": null, "message": "Token is missing. Please provide proper Authorization header with Bearer token", "status_code": 401, "success": false, "message_code": "missing_token"}