e-Aadhaar Download via DigiLocker
Download a user's e-Aadhaar XML from DigiLocker. Extract verified identity details including name, address, DOB, and photo.
curl -X POST "https://production.deepvue.tech/v1/kyc/digilocker/eaadhaar" \
-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",
"initial_deepvue_transaction_id": "example_string",
"generate_pdf": true
}'
import requests
import json
url = "https://production.deepvue.tech/v1/kyc/digilocker/eaadhaar"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
}
data = {
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"generate_pdf": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/kyc/digilocker/eaadhaar", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
},
body: JSON.stringify({
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"generate_pdf": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"generate_pdf": true
}`)
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/kyc/digilocker/eaadhaar", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("client-id", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/kyc/digilocker/eaadhaar')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['x-api-key'] = 'YOUR_API_KEY'
request['client-id'] = 'YOUR_API_KEY'
request.body = '{
"consent": "example_string",
"purpose": "example_string",
"initial_deepvue_transaction_id": "example_string",
"generate_pdf": true
}'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": 1731338938745,
"transaction_id": "string",
"sub_code": "string",
"message": "string",
"data": {
"masked_uid": "string",
"proof_of_identity": {
"dob": "string",
"gender": "string",
"name": "string"
},
"proof_of_address": {
"care_of": "string",
"district": "string",
"house": "string",
"locality": "string",
"street": "string",
"vtc": "string",
"pincode": "string",
"state": "string",
"country": "string"
},
"photo": "base64-string",
"document_pdf": "base64-string"
}
}
{
"code": 400,
"timestamp": null,
"transaction_id": "string",
"sub_code": "DUPLICATE_REQUEST",
"message": "Invalid Initial Deepvue Transaction id."
}
{
"detail": "Inactive client_id"
}
{
"detail": "Bad Request"
}
{
"code": 401,
"timestamp": null,
"transaction_id": "string",
"sub_code": "SESSION_EXPIRED",
"message": "Digilocker session expired."
}
{
"detail": "Not authenticated"
}
{
"detail": "Invalid client_id, access Denied"
}
{
"detail": "Could not validate credentials"
}
{
"detail": "Incorrect client_id or client_secret"
}
{
"detail": "Not a valid token"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
{
"detail": "Internal Server Error"
}
{
"code": 503,
"timestamp": null,
"transaction_id": "string",
"sub_code": "FAILED",
"message": "Failed to fetch data from Digilocker."
}
/v1/kyc/digilocker/eaadhaar
The CLIENT_SECRET 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.
The media type of the request body
Pass Y stating the consent has been duly taken from the user.
Mention the purpose.
transaction_id received from the Initiate Session API Endpoint.
Set this true or false based on whether you wish to generate a PDF.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
API Key for authentication. The CLIENT_ID provided to you. This header parameter is required for authentication purposes.
Body
Pass Y stating the consent has been duly taken from the user.
Mention the purpose.
transaction_id received from the Initiate Session API Endpoint.
Set this true or false based on whether you wish to generate a PDF.
Responses
Per UIDAI regulations, service providers shall not share, publish, or display either the share code or XML file or its contents with anyone else. Non-compliance carries serious legal consequences under multiple sections of The Aadhaar Act, 2016 and related regulations.
Consent must be mandatorily stored at your end before proceeding with verification.
Last updated 4 weeks ago
Built with Documentation.AI