DigiLocker e-Aadhaar API
New
Read a person's e-Aadhaar from their DigiLocker, with their consent, and get their name, date of birth, gender and address as structured data.
Overview
The e-Aadhaar in a person's DigiLocker is issued by the authority that issues Aadhaar. It carries their name, date of birth, gender, address and photograph, from the issuer itself. Onboarding teams that need a verified address or date of birth usually ask for a photo of an Aadhaar card, then read it and check it by hand. A copy from DigiLocker needs neither. Once the person has opened a DigiLocker session and consented, your application sends the session reference and gets back their e-Aadhaar details as structured data, with the Aadhaar number masked.
- Category
- KYC Services
- Coverage
- People with an Aadhaar who open a DigiLocker session and consent
- Input
- A DigiLocker session reference
- Output
- Masked Aadhaar number, name, date of birth, gender, care-of name, address and photograph
- Typical users
- Lenders and NBFCs, fintech platforms, insurers, telecom operators, staffing and gig platforms
- Coverage note
- Only people whose DigiLocker holds an e-Aadhaar and who open a session and consent
The overview and the sections after the reference are the FinSour API catalog’s own record for this service, rendered unaltered.
Endpoint URL and method
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Authentication
Send your API key in this header on every call, from your own server: a key sent from a browser is refused. A key starting fs_test_ calls the sandbox and one starting fs_live_ calls production, at the same address. Create keys in the FinSour console.
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Request parameters
Headers
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
Idempotency-Key | string | Required | A key you generate for each attempt. Sending the same key again returns the first answer instead of running the check twice; the same key with a different body is refused. | 8 to 255 characters. Matches ^[A-Za-z0-9._:-]+$ |
Body
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
input | object | Required | The details to check. | — |
input. | string | Required | — | Matches ^dls_[0-9A-HJKMNP-TV-Z]{26}$ |
options | object | Optional | Settings for this call. | — |
options. | string | Optional | Your own reference for this call. It comes back unchanged as meta.reference. | 1 to 128 characters |
options. | object | Optional | The person's consent to this check. | — |
options. | boolean | Required | Send true once the person has agreed to the check. | Always true |
options. | string (date-time) | Required | When the person gave consent. | — |
options. | string | Required | What the check is for, for example kyc. | 1 to 64 characters |
Request samples
cURL
curl -X POST https://gateway.staging.finsour.io/v1/identity/digilocker-aadhaar \
-H "X-Api-Key: $FINSOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"sessionId": "<sessionId>"
}
}'Node.js
const response = await fetch("https://gateway.staging.finsour.io/v1/identity/digilocker-aadhaar", {
method: "POST",
headers: {
"X-Api-Key": process.env.FINSOUR_API_KEY,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"sessionId": "<sessionId>"
}
}),
});
console.log(response.status, await response.json());Python
import os
import uuid
import requests
response = requests.post(
"https://gateway.staging.finsour.io/v1/identity/digilocker-aadhaar",
headers={
"X-Api-Key": os.environ["FINSOUR_API_KEY"],
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"sessionId": "<sessionId>",
},
},
timeout=30,
)
print(response.status_code, response.json())Generated from the fields above. Replace each value in angle brackets with your own; the key is read from FINSOUR_API_KEY.
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Response schema
| Name | Type | Present | Description | Constraints |
|---|---|---|---|---|
data | object | Always | The result of the check. | — |
data. | boolean | Always | — | — |
data. | object or any or null | Always | — | — |
data. | object | Always | — | — |
data. | string | Always | When the answer was fetched: RFC 3339 UTC with a Z, never an epoch or an IST offset. | Matches ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$ |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Error codes
| Code | Status | Meaning | Retrying |
|---|---|---|---|
API_VERSION_UNSUPPORTED | 400 | That API version is no longer supported. | Do not retry automatically |
IDEMPOTENCY_KEY_INVALID | 400 | That Idempotency-Key does not meet the required format. | Do not retry automatically |
IDEMPOTENCY_KEY_REQUIRED | 400 | An Idempotency-Key header is required for this request. | Do not retry automatically |
REQUEST_MALFORMED | 400 | The request could not be parsed. | Do not retry automatically |
AUTH_KEY_EXPIRED | 401 | The API key is not valid. | Do not retry automatically |
AUTH_KEY_INVALID | 401 | The API key is not valid. | Do not retry automatically |
AUTH_KEY_MISSING | 401 | No API key was presented. | Do not retry automatically |
AUTH_KEY_REVOKED | 401 | The API key is not valid. | Do not retry automatically |
INSUFFICIENT_BALANCE | 402 | The available balance is not enough for this request. | Do not retry automatically |
AUTH_IP_NOT_ALLOWED | 403 | This API key may not be used from this address. | Do not retry automatically |
ENTITLEMENT_MISSING | 403 | This organization is not entitled to that product in this environment. | Do not retry automatically |
ORGANIZATION_SUSPENDED | 403 | This organization is not active. | Do not retry automatically |
PRODUCT_NOT_AVAILABLE | 403 | That product is not available. | Do not retry automatically |
PRODUCT_RETIRED | 403 | That product has been withdrawn. | Do not retry automatically |
SCOPE_INSUFFICIENT | 403 | This API key does not carry the scope this product requires. | Do not retry automatically |
DIGILOCKER_SESSION_NOT_FOUND | 404 | No open DigiLocker session has that id. | Do not retry automatically |
PRODUCT_NOT_FOUND | 404 | No such product. | Do not retry automatically |
DIGILOCKER_CONSENT_PENDING | 409 | The person has not yet given consent on DigiLocker. | Safe to retry |
DIGILOCKER_STEP_INVALID | 409 | The DigiLocker session is not at this step. | Do not retry automatically |
IDEMPOTENCY_KEY_REUSED | 409 | That idempotency key was already used for a different request. | Do not retry automatically |
PRICE_UNAVAILABLE | 409 | No active price covers this product right now. | Safe to retry |
REQUEST_IN_PROGRESS | 409 | An earlier attempt with this key is still running. | Safe to retry |
SETTLEMENT_PENDING | 409 | This request is awaiting reconciliation by an operator. | Do not retry automatically |
API_VERSION_SUNSET | 410 | That API version passed its announced sunset date. | Do not retry automatically |
REQUEST_TOO_LARGE | 413 | The request body is too large. | Do not retry automatically |
UNSUPPORTED_MEDIA_TYPE | 415 | That content type is not accepted on this route. | Do not retry automatically |
DIGILOCKER_CONSENT_DENIED | 422 | The person did not give consent on DigiLocker. | Do not retry automatically |
DIGILOCKER_DETAILS_MISMATCH | 422 | The details do not match the person's DigiLocker record. | Do not retry automatically |
DIGILOCKER_OTP_INVALID | 422 | The code was not accepted. Ask the person for the code they received and try again. | Do not retry automatically |
DIGILOCKER_SESSION_EXPIRED | 422 | The DigiLocker session has expired. Start a new session. | Do not retry automatically |
SANDBOX_FIXTURE_MISSING | 422 | No sandbox fixture exists for this input. Use a different test value. | Do not retry automatically |
UPSTREAM_REJECTED | 422 | The upstream source rejected the input. | Do not retry automatically |
VALIDATION_FAILED | 422 | The request payload is invalid. | Do not retry automatically |
CONCURRENCY_LIMIT | 429 | Too many simultaneous requests. | Safe to retry |
QUOTA_EXCEEDED | 429 | The allowance for this window is spent. | Do not retry automatically |
RATE_LIMITED | 429 | Too many requests. | Safe to retry |
INTERNAL_ERROR | 500 | An unexpected error occurred. | Safe to retry |
OUTCOME_UNCERTAIN | 502 | The outcome of this request is not yet known. Retry with the same Idempotency-Key. | Do not retry automatically |
UPSTREAM_UNAVAILABLE | 502 | The upstream source is unavailable. Retry shortly. | Safe to retry |
MAINTENANCE_MODE | 503 | The service is in a maintenance window. | Safe to retry |
NO_PROVIDER_AVAILABLE | 503 | No provider can serve this product right now. | Safe to retry |
SERVICE_OVERLOADED | 503 | The service is shedding load. Retry shortly. | Safe to retry |
UPSTREAM_TIMEOUT | 504 | The upstream source did not respond in time. | Safe to retry |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Rate limits
| Scope | Limit | Window | At the limit |
|---|---|---|---|
| Your API key, within your organisation's limit | The figure in X-RateLimit-Limit | Per minute | 429 RATE_LIMITED, with Retry-After in seconds. Every answer past authentication carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. |
Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.
Use cases
- Lending: taking a verified address and date of birth from the e-Aadhaar
- Telecom: completing subscriber KYC with details from the issuer
- Staffing and gig: confirming a worker's identity before the first assignment
- Healthcare: resolving a patient to one verified identity
What this service does
Details from the issuer
Name, date of birth, gender, care-of name, address and photograph from the person's e-Aadhaar, not from a photo of a card.
The number arrives masked
Only the last four digits of the Aadhaar number are returned, so the full number never enters your systems from this call.
Read from a consented session
The read uses the session the person opened with their Aadhaar details and a one-time code.
A clear not-found answer
When DigiLocker holds no e-Aadhaar for the person, the response says so, and your flow can offer another route.
How a check runs
Arrange access
Tell us how the e-Aadhaar fits your KYC. We arrange access for your organization under the applicable service contract.
Open a DigiLocker session
The person gives their Aadhaar details and confirms the one-time code, with DigiLocker Consent.
Read the e-Aadhaar
Your application sends the session reference while the session is open.
Use the structured details
Fill the identity and address fields and compare them with what else you hold.
Keep only what you need
Store the masked number and the fields your process needs with the application, and limit who can see them.
Questions
- What do I send to read an e-Aadhaar?
- The reference of a DigiLocker session the person opened with their Aadhaar details and a one-time code.
- What does the response include?
- The masked Aadhaar number, the person's name, date of birth, gender, care-of name, address and photograph, where the e-Aadhaar holds them.
- Is the full Aadhaar number returned?
- No. Only the last four digits are returned.
- Can I read an e-Aadhaar through a consent link?
- Not at present. A consent link can ask for PAN and driving licence; the e-Aadhaar is read from a session opened with the Aadhaar details and a code.
- Do I need the person's consent?
- Yes. The session is the person's consent, and Aadhaar carries rules of its own: read it only for the purpose they agreed to, and keep only what that purpose needs.
- How do I get access to the DigiLocker e-Aadhaar API?
- Start with Get API and tell us how the e-Aadhaar fits your KYC and what volumes you expect. We set up access under the applicable service contract.
Catalog entry last updated .