Aadhaar eKYC V1 — Verify OTP & Get Data
Verify the OTP and retrieve the user's Aadhaar details — name, address, DOB, gender, and photo from digitally signed XML data.
curl -X POST "https://production.deepvue.tech/v1/ekyc/aadhaar/verify-otp?otp=example_string&session_id=example_string&consent=example_string&purpose=example_string&mobile_number=example_string&generate_pdf=true" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "client-id: YOUR_API_KEY"
import requests
import json
url = "https://production.deepvue.tech/v1/ekyc/aadhaar/verify-otp?otp=example_string&session_id=example_string&consent=example_string&purpose=example_string&mobile_number=example_string&generate_pdf=true"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch("https://production.deepvue.tech/v1/ekyc/aadhaar/verify-otp?otp=example_string&session_id=example_string&consent=example_string&purpose=example_string&mobile_number=example_string&generate_pdf=true", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY",
"client-id": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/ekyc/aadhaar/verify-otp?otp=example_string&session_id=example_string&consent=example_string&purpose=example_string&mobile_number=example_string&generate_pdf=true", nil)
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/ekyc/aadhaar/verify-otp?otp=example_string&session_id=example_string&consent=example_string&purpose=example_string&mobile_number=example_string&generate_pdf=true')
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'
response = http.request(request)
puts response.body
{
"code": 200,
"timestamp": 1738243999577,
"transaction_id": "f6efc218742a405c8dd65cf19c13b878",
"sub_code": "SUCCESS",
"message": "Aadhaar eKYC Successful",
"data": {
"address": {
"careOf": "S/O H. Nue Mahammed",
"country": "India",
"district": "Bangalore",
"house": "NO. 6",
"landmark": "",
"locality": "MTS LAYOUT J X NAGAR 51TH PHASE",
"pin": "561118",
"postOffice": "J P Nagar",
"state": "Karnataka",
"street": "19TH MAIN",
"subDistrict": "",
"vtc": "Bangalore"
},
"dateOfBirth": "28-06-1999",
"email": "e2afb1d691d72a535b501053e6291abdb51c05cccc7c08b4439ab3e",
"gender": "M",
"generatedAt": "1738304139979",
"maskedNumber": "xxxx-xxxx-8091",
"name": "Mohammed Nihar",
"phone": "ad0e19163c4ff90313ce2b1457ea0687fbfbf0f344566e50bed07f60ae064",
"photo": "<base64_encoded_image>"
}
}
{
"code": 400,
"timestamp": 1738243998047,
"transaction_id": "c9a8b14d68374fd5ae688195cb54372d",
"sub_code": "INVALID_INPUT",
"message": "Invalid Session Id"
}
{
"detail": "Not authenticated"
}
{
"detail": "Not a valid token"
}
{
"detail": [
{
"loc": [
"query",
"consent"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
{
"detail": "Internal Server Error"
}
{
"code": null,
"timestamp": null,
"transaction_id": "string",
"sub_code": "INVALID_INPUT",
"message": "Error while fetching zip xml"
}
{
"code": null,
"timestamp": null,
"transaction_id": "string",
"message": "Source Unavailable"
}
/v1/ekyc/aadhaar/verify-otp
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.
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.
Query Parameters
Responses
Returned data
Successful OTP verification returns the following resident details:
- Reference number
- Resident's name
- Resident's address
- Gender
- Photo
- Date of birth
- Mobile number (hashed)
- Email (hashed)
The OTP is valid for 10 minutes. You can optionally verify the mobile number of the OTP recipient and generate a PDF of the Aadhaar data using the generate_pdf parameter.
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 invites penalties under sections of The Aadhaar (Authentication) Regulation, 2016, The Aadhaar (Sharing of Information) Regulation, 2016, and The Aadhaar Act, 2016.
Consent must be mandatorily stored at your end before proceeding with verification.
Last updated 4 weeks ago
Built with Documentation.AI