Skip to main content
POST
Initiate a consent session

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to initiate a consent session.

flow
enum<string>
required

Whether the user signs in to an existing DigiLocker account or creates one

Available options:
signin,
signup
redirect_url
string<uri>
required

HTTPS URL the user is redirected to after granting or denying consent. Must be publicly reachable

Required string length: 1 - 2083
doc_types
enum<string>[]
required

Document types consent is being requested for

Minimum array length: 1

A document type that can be requested from DigiLocker.

Available options:
aadhaar,
pan,
driving_license
options
SessionOptions · object | null

Configuration controlling the DigiLocker authentication and sign-up experience.

Unix millisecond timestamp after which the consent request expires, at least an hour ahead

Response

Successful Response

Response to initiating a session.

code
integer
required

HTTP status code of the response

timestamp
integer
required

Unix millisecond timestamp of when the response was produced

transaction_id
string
required

Identifier for this call. Quote it when raising a query about one

data
Session · object
required

An initiated consent session and the URL to send the user to.