- Generating an OTP for Aadhaar authentication
- Verifying the OTP to complete authentication
- Retrieving e-KYC data including name, address, and photo
Before you begin, ensure you have:
- Generated a Sandbox
x-api-key - Obtained a JWT
authorizationtoken using the Authenticate API - Obtained user consent to perform Aadhaar OTP authentication
Generate Aadhaar OTP
Use the Generate OTP API to send an OTP to the mobile number registered with the Aadhaar number.The API returns a
The OTP is sent to the mobile number linked with the Aadhaar. Store the
reference_id that you’ll use in the next step to verify the OTP and complete authentication.Request
Request
Response
Response
Unique identifier to track this OTP verification session. Required for verifying the OTP.
reference_id securely for the next step.Verify OTP and retrieve e-KYC data
After the user receives the OTP, verify it using the Verify OTP API to complete authentication and retrieve e-KYC data.
When verification succeeds, the response includes complete e-KYC data:
Request
Request
Response - Verification succeeded
Response - Verification succeeded
Response - Invalid OTP
Response - Invalid OTP
Response - OTP expired
Response - OTP expired
- Personal details: name, date of birth, gender
- Complete address with structured components
- Base64-encoded photograph from Aadhaar
- Hashed mobile number and email address
VALID– OTP verified successfully, e-KYC data retrieved- Error messages indicate invalid OTP or expired session
- Invalid OTP: Allow users to re-enter the OTP with retry limits
- OTP expired: Generate a new OTP by repeating Step 1
- Invalid reference ID: Ensure you’re using the correct
reference_idfrom the Generate OTP response
Next steps
Once Aadhaar OTP authentication succeeds, you can:- Store the verified e-KYC data for customer onboarding and compliance
- Use the authenticated identity for account creation workflows
- Combine with other KYC checks like PAN verification or bank account validation
- Display the photograph for visual identity confirmation
View Aadhaar API reference
Explore detailed API documentation, parameters, and response schemas