Skip to main content
POST
Submit Aadhaar OKYC OTP
Step 2 of Aadhaar OKYC. Send the session_id from OKYC send OTP and the 6-digit OTP the holder received. A correct OTP returns the holder’s Aadhaar record: name, date of birth or year of birth, gender, care-of, the address split into parts and as one line, and the photo when it is released.

Environments

How to read the result

  • A correct OTP returns 200, status: "success", error_code: null and data. This is the only billed outcome. This step has no IDTO_202 result.
  • Every key in data is always present. Filled keys come first and null keys last, in the same order for every call.
  • dob is YYYY-MM-DD when the full date is released. Some records release only the year: then dob is null and year_of_birth holds the four-digit year. Never assume a day and month.
  • address is one line built from the parts (house, street, locality, district, state, country) and ends with - <pincode>. country is always India.
  • has_photo is true when the record released a photo, which is then in photo.
  • A wrong or expired OTP is a 422 IDTO_205, not billed. The holder can try again with the same session_id until the attempt limit for that session is reached; then you get 429 IDTO_206 and must start again from step 1. Only a wrong OTP counts towards the limit.
Send an Idempotency-Key header. A retry with the same key and body returns the first response without re-submitting the OTP and without a second charge. See Idempotency.

Errors

A malformed OTP is rejected before it is checked, so it does not use up an attempt. A missing or wrong X-Client-ID / X-API-Key pair returns 401 with a detail string and is not billed. The full code list is in v2 error codes.

Test scenarios

Input rules: otp is exactly 6 digits. session_id is the value step 1 returned, at most 255 characters. See the 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.

Headers

Idempotency-Key
string

Make retries of this exact request safe. If the same key is replayed with an identical request body, the original result is returned without re-running the verification or billing again. If the same key is replayed with a different body, the request is rejected with IDTO_010 (422). Omitting this header runs every request as new.

Maximum string length: 255

Body

application/json
session_id
string
required

From okyc_generate_otp.

Maximum string length: 255
otp
string
required

6 digits.

Maximum string length: 10
user_id
string
Maximum string length: 255
workflow_session_token
string
Maximum string length: 64

Response

OTP accepted; the Aadhaar demographic record was retrieved. This product has no IDTO_202 no-record outcome.

status
enum<string>
required
Available options:
success
message
string
required
error_code
string | null
required

null on a full match, an IDTO_2xx code on a definitive no-record result. Both are billed.

data
object | null
required

Every key is always present. Filled keys come first, null keys last.

billed
enum<boolean>
required
Available options:
true
tranx_id
string | null
timestamp
string<date-time> | null
Last modified on December 1, 2026