v1
latestOpenAPI 3.0.32026-07-14108241269.2 KBDigiLocker
Initiate DigiLocker session
Initiates a DigiLocker session for the user. Requires user consent and redirect information. Accepts a JSON body with user_id (optional), consent (bool), consent_purpose (string), redirect_url (string), redirect_to_signup (bool, optional), documents_for_consent (array, optional) and state (string, optional).
| HTTP Status | Code | Reason | Message | Merchant Action |
|---|---|---|---|---|
| 200 | 1000 | AUTH_URL_GENERATED | Authorization URL generated. | Redirect user to URL. |
| 400 | 3001 | INVALID_DOC_CODE | One or more documents_for_consent invalid. | Pass correct document codes from master list. |
| 400 | 3002 | MISSING_REDIRECT_URL | redirect_url missing. | Pass valid redirect URL. |
post/verify/digilocker/initiate_session
Request body
Response
Authorization URL generated
Example response
{
"status": "success",
"code": 1000,
"url": "https://digilocker.idto.ai/digilocker?client_id=28d04bf7-9fa4-46ea-ad39-9d466c1ca3bf&redirect_uri=http%3A//localhost%3A3000/done&redirect_to_signup=false&req_docs=ADHAR%2CPANCR&state=test",
"chargeble": "true",
"user_consent": "true"
}