Skip to main content
POST
Download the e-Aadhaar XML
Step 3 of the DigiLocker flow. Returns the holder’s e-Aadhaar from DigiLocker as an XML file, not JSON: the response has the XML’s content type and Content-Disposition: attachment; filename="document.xml". Save the body as a file. The XML is the e-Aadhaar as issued, so keep it under the same controls as any Aadhaar copy. The holder must have consented to share Aadhaar during the DigiLocker sign-in.

Environments

Billing

Charged only when the response returns the XML file. Errors return JSON and are not charged. A charged JSON response also carries "chargeble": "true" and "user_consent": "true" (spelled as the API returns them).
This endpoint has no idempotency support. A retry after a timeout runs the call again and can be charged twice.

Errors

Test scenarios

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
reference_key
string
required

From /verify/digilocker/get_reference. Valid for one hour.

user_id
string

Your own identifier for the end user, stored with the call.

workflow_session_token
string

Only when the call is made inside an idto workflow session.

Response

The e-Aadhaar XML file. Charged.

The response is of type file.

Last modified on October 4, 2026