1. Home
  2. APIs
  3. Identity

Aadhaar e-KYC (OTP) API

Verify Aadhaar with an OTP sent to the holder’s mobile.

Mode: OTP, two calls
Checked against: UIDAI offline e-KYC

Overview

A two-step flow. First call sends a one-time password to the mobile number linked with the Aadhaar. Second call submits that OTP and returns the holder’s name, date of birth, gender, address and photo. The Aadhaar number itself is never returned in full.

POST/v1/verify/aadhaar/otp then POST/v1/verify/aadhaar/submit

Where it’s used

  • Digital account opening
  • Gig worker and agent onboarding
  • Address proof for deliveries and services
  • SIM and connection KYC

How the check runs

  1. Step 1: you send the 12-digit Aadhaar number with consent. We send an OTP to the mobile number registered with UIDAI and return a ref_id.
  2. Your app shows an OTP box. The OTP is valid for about 10 minutes.
  3. Step 2: you send the ref_id and the OTP the user typed.
  4. We fetch the signed offline e-KYC data, verify UIDAI’s digital signature, and return parsed fields with the Aadhaar number masked.
  5. The full Aadhaar number is discarded after the call. Only the masked form is kept in logs.

Request

FieldDescription
aadhaar_number12-digit Aadhaar (step 1)
ref_id + otpReference from step 1 and the 6-digit OTP (step 2)
consent"Y" once your user has agreed to the check. Required for any check on a person.
curl -X POST https://api.yetlix.com/v1/verify/aadhaar/submit \
  -H "x-client-id: $YETLIX_CLIENT_ID" \
  -H "x-client-secret: $YETLIX_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"ref_id":"otp_8f2c1a9e","otp":"482915","consent":"Y"}'

Response fields

Inside the data object. The envelope (status, request_id, billable, timestamp) is the same for every API and is described in the docs.

FieldTypeMeaning
namestringName as per Aadhaar.
dobstringDate of birth, DD-MM-YYYY. Some records only have year of birth.
genderenumM, F or T.
aadhaar_maskedstringXXXX XXXX followed by the last four digits.
addressobjecthouse, street, locality, vtc, district, state, pincode, as split by UIDAI.
care_ofstringS/O, D/O, W/O or C/O name, if present.
photostringBase64 JPEG of the Aadhaar photo. Use it for face match.
signature_validbooleantrue when UIDAI’s signature on the e-KYC data checked out. Never accept data where this is false.

Outcomes and what to do

Every check can end in a handful of ways. Decide up front what your product does in each case, so nothing falls through to a support ticket.

OTP_SENT

Step 1 succeeded.

Do this: Show the OTP input with a 10-minute timer and a resend after 60 seconds.

INVALID_OTP

The user typed the wrong OTP.

Do this: Let them retry. After 3 wrong attempts the ref_id is locked; start again from step 1.

OTP_EXPIRED

More than ~10 minutes passed.

Do this: Restart from step 1.

MOBILE_NOT_LINKED

No mobile number is registered with this Aadhaar.

Do this: Offer DigiLocker or an alternative ID; the user must update their mobile at an Aadhaar centre.

SUCCESS

Verified e-KYC data returned.

Do this: Run face match between the Aadhaar photo and a live selfie before approving.

Sandbox test values

Send these values in otp with your sandbox key to get each result. Anything else returns INVALID_INPUT in sandbox.

ValueReturns
482915Correct OTP, data returned
000000Wrong OTP
111111OTP expired

Run these in the playground

Best practices

  • Never store the full Aadhaar number in your own database. Store aadhaar_masked and the request_id.
  • Pair with Face match and Liveness: OTP proves access to the phone, not that the phone’s owner is the person applying.
  • Use the address object to pre-fill forms instead of asking the user to type it again.
  • Show plain-language consent before step 1: what you’ll fetch, why, and that the user can choose another document.

Compliance note. Aadhaar-based verification is governed by the Aadhaar Act, 2016 and UIDAI regulations, and its use by financial entities is set out in each regulator’s KYC directions. Offline e-KYC must be voluntary, with explicit consent and an alternative offered. Talk to us about which Aadhaar flow your entity and use case can use.

Frequently asked

Why did my user not receive the OTP?

The OTP goes to the mobile registered with UIDAI, which is often an old number. Use the resend option after 60 seconds; if it still fails, offer DigiLocker or another ID.

Can I store the photo?

Yes, for as long as your KYC record-keeping rules require, protected like any other KYC document.

Is biometric authentication supported?

Not through this API. Biometric Aadhaar authentication needs a registered device and an authorised entity; we can advise on options.

Often used with