Skip to main content
POST
Get the DigiLocker profile (v1)
Exchanges the code and codeVerifier that DigiLocker sends to your redirect URL for the holder’s DigiLocker profile: DigiLocker id, name, date of birth, gender, mobile, email and whether Aadhaar is linked. The profile is passed through as DigiLocker returns it, so mobile and email are not masked. Each code can be exchanged once. This is a v1 endpoint: the response is a flat object, not the v2 envelope. Get the code by starting a session with Start a DigiLocker session and letting the holder sign in and consent. See the DigiLocker guide.

Environments

This endpoint has no Idempotency-Key support. A retried call runs again and can be charged twice. Retry only after you have confirmed the first call failed.
For new integrations use DigiLocker profile: it supports Idempotency-Key, returns a billed flag and uses one error format. See Migrate from v1.

How to read the result

  • HTTP 200 with status: "success": the profile is in the top-level fields. dob is as DigiLocker returns it, usually DDMMYYYY. Charged.
  • Billing signal: chargeble and user_consent are "true" on a charged call. There is no billed field on v1.

Errors

Every wrapped detail object also carries data: null, tranx_id and timestamp. Questions: Aadhaar FAQ. Was this page helpful? Email us at tech@idto.ai with the page link.

Authorizations

X-Client-ID
string
header
default:<client-id>
required

The Client ID shown on the API Credentials page of the idto dashboard. It is not your account or customer ID, which returns 401. Send it on every server-to-server request together with X-API-Key. Staging and production client IDs are different.

X-API-Key
string
header
default:<api-key>
required

Your API key from the idto dashboard (API credentials). Keep it on your server; never ship it in a browser or mobile app. Send it on every server-to-server request together with X-Client-ID.

Body

application/json
code
string
required

The code DigiLocker sent to your redirect URL.

code_verifier
string
required

The codeVerifier DigiLocker sent with it.

user_id
string

Your own reference for the end user.

Response

The profile was returned. Charged.

The holder's DigiLocker profile as DigiLocker returns it, plus status.

status
enum<string>
Available options:
success
digilockerid
string

The holder's DigiLocker id.

name
string
dob
string

As DigiLocker returns it, usually DDMMYYYY with no separators.

gender
string
eaadhaar
string

Y when Aadhaar is linked to the DigiLocker account.

mobile
string

Unmasked.

email
string

Unmasked.

tranx_id
string

idto transaction id for this call.

timestamp
string<date-time>
chargeble
enum<string>

Present and "true" only when the call was charged.

Available options:
true

Present and "true" only when the call was charged.

Available options:
true
Last modified on October 4, 2026