DigilockerInitiate Session

DigiLocker Session — Start Document Access

Start a DigiLocker session to begin the user consent and document access flow. Returns an authorization URL for user redirection.

curl -X POST "https://production.deepvue.tech/v1/kyc/digilocker/initiate-session" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "client-id: YOUR_API_KEY" \
  -d '{
  "consent": "example_string",
  "purpose": "example_string",
  "redirect_url": "example_string",
  "doc_types": [
    "aadhaar"
  ]
}'
{
  "code": 201,
  "timestamp": 1738305237960,
  "transaction_id": "0c8c7833678e412f9fec77dbe0494562",
  "data": {
    "authorization_url": "https://production.deepvue.tech/v1/kyc/digilocker/digilocker-redirect?state=0c8c7833678e412f9fec77dbe0494562"
  }
}
POST
/v1/kyc/digilocker/initiate-session
POST
API Key (header: x-api-key)
x-api-keystring
Required

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
API Key (header: client-id)
client-idstring
Required

The CLIENT_ID provided to you. This header parameter is required for authentication purposes.

The CLIENT_ID provided to you. This header parameter is required for authentication purposes.
Content-Typestring
Required

The media type of the request body

Options: application/json
purposestring
Required

The purpose parameter specifies the reason for initiating the session in the Digilocker service.

redirect_urlstring

URL where the user needs to be redirected once the consent is approved.

doc_typesarray

List of ID Documents. Allowed values are 'aadhaar', 'pan', 'dl'. Only the specified document types will be displayed on the consent screen page for the user. Default value: ['aadhaar','pan','dl']

Request Preview
Response

Response will appear here after sending the request

Authentication

header
x-api-keystring
Required

API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

header
client-idstring
Required

API Key for authentication. The CLIENT_ID provided to you. This header parameter is required for authentication purposes.

Body

application/json
purposestring
Required

The purpose parameter specifies the reason for initiating the session in the Digilocker service.

redirect_urlstring

URL where the user needs to be redirected once the consent is approved.

doc_typesarray

List of ID Documents. Allowed values are 'aadhaar', 'pan', 'dl'. Only the specified document types will be displayed on the consent screen page for the user. Default value: ['aadhaar','pan','dl']

Responses