V1Verify OTP

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=123456&session_id=a73af0b7accc4c3fbaa3dd2dc2cab550&consent=Y&purpose=lending&mobile_number=9876543210&generate_pdf=false" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "client-id: YOUR_API_KEY"
{
  "code": 200,
  "timestamp": 1738243999577,
  "transaction_id": "f6efc218742a405c8dd65cf19c13b878",
  "sub_code": "SUCCESS",
  "message": "Aadhaar eKYC Successful",
  "data": {
    "address": {
      "careOf": "S/O Rajesh Kumar Sharma",
      "country": "India",
      "district": "Pune",
      "house": "Flat 4B",
      "landmark": "",
      "locality": "Sunrise Apartments",
      "pin": "411001",
      "postOffice": "Pune City",
      "state": "Maharashtra",
      "street": "MG Road",
      "subDistrict": "",
      "vtc": "Pune"
    },
    "dateOfBirth": "15-06-1985",
    "email": "e2afb1d691d72a535b501053e6291abdb51c05cccc7c08b4439ab3e",
    "gender": "M",
    "generatedAt": "1738304139979",
    "maskedNumber": "xxxx-xxxx-0120",
    "name": "RAHUL KUMAR SHARMA",
    "phone": "ad0e19163c4ff90313ce2b1457ea0687fbfbf0f344566e50bed07f60ae064",
    "photo": "<base64_encoded_image>"
  }
}
POST
/v1/ekyc/aadhaar/verify-otp
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: x-api-key)
x-api-keystring
Required

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.
API Key (header: client-id)
client-idstring
Required

The CLIENT_ID 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

header
x-api-keystring
Required

API Key for authentication. The CLIENT_SECRET provided to you. This header parameter is required for authentication purposes.

header
client-idstring
Required

API Key for authentication. The CLIENT_ID provided to you. This header parameter is required for authentication purposes.

Query Parameters

otpstring
Required
Example:
123456
session_idstring
Required
Example:
a73af0b7accc4c3fbaa3dd2dc2cab550
purposestring
Required
Example:
lending
mobile_numberstring
Example:
9876543210
generate_pdfboolean
Example:
false

Responses

codeinteger
timestampinteger
transaction_idstring
sub_codestring
messagestring
dataobject

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 photo field is a base64-encoded image. Decode it with your language's standard base64 decoder to obtain the raw image bytes: base64.b64decode() in Python, Buffer.from(photo, 'base64') in Node.js, or base64_decode() in PHP.

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.