Aadhaar Verification API

Ippocloud's Aadhaar Verification API allows you to utilize our Aadhaar Auth for onboarding verified users by entering their 12 digit Aadhaar number


To use this API, you need an API key.
Please login to your account and navigate to dashboard > API configuration

Learn how to authenticate the APIs.

Initiate Transaction

Use the below endpoint to Initiate a transaction

/uidai/aadhaar-authentication/Initiate-transaction
curl -X GET https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction
-H "Authorization: Basic bGl2ZV82MzAzZT...."
$url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
   "Authorization: Basic bGl2ZV82MzAzZT....",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction";
var xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.setRequestHeader("Authorization", "Basic bGl2ZV82MzAzZT....");
xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};
xhr.send();
import requests
from requests.structures import CaseInsensitiveDict
url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction"
headers = CaseInsensitiveDict()
headers["Authorization"] = "Basic bGl2ZV82MzAzZT...."
resp = requests.get(url, headers=headers)
print(resp.status_code)
URL url = new URL("https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestProperty("Authorization", "Basic bGl2ZV82MzAzZT....");
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/initiate-transaction";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Headers["Authorization"] = "Basic bGl2ZV82MzAzZT....";
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
   var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
{
    "data": {
        "transaction_id": 16327245,
        "entity": "aadhaar_authentication",
        "status": "CAPTCHA_GENERATED",
        "msg": "captcha generated successfully",
        "captcha": "captcha\/6063150f12640dd.png"
    }
}

Response Parameters

data

object contains all the details such transaction_id, entity, status, msg, captcha

transaction_id

integer Unique ID for this transaction. you have to use this transaction ID in the next steps

entity

string something that exists separately from something else and has its own identity

status

string Return the status of the transaction CAPTCHA_GENERATED

msg

string Response message or notice related to the query

captcha

string Returns a url of the captcha image

Request OTP

Use the below endpoint to request a OTP after initiating the transaction

/uidai/aadhaar-authentication/request-otp
curl -X POST https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp
-H "Authorization: Basic bGl2ZV82MzAzZT...."
-H "Content-Type: application/json"
-d "{\"transaction_id\":\"16327245\",
\"aadhaar_number\":\"456334521954\", \"captcha_value\":\"563452\"}"
$url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
   "Authorization: Basic bGl2ZV82MzAzZT....",
   "Content-Type: application/json",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = '{"transaction_id":"16327245",
 "aadhaar_number":"456334521954", "captcha_value":"563452"}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Authorization", "Basic bGl2ZV82MzAzZT....");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};
var data = '{"transaction_id":"16327245",
 "aadhaar_number":"456334521954", "captcha_value":"563452"}';
xhr.send(data);
import requests
from requests.structures import CaseInsensitiveDict
url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp"
headers = CaseInsensitiveDict()
headers["Authorization"] = "Basic bGl2ZV82MzAzZT...."
headers["Content-Type"] = "application/json"
data = '{"transaction_id":"16327245",
"aadhaar_number":"456334521954", "captcha_value":"563452"}'
resp = requests.post(url, headers=headers, data=data)
print(resp.status_code)
URL url = new URL("https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Authorization", "Basic bGl2ZV82MzAzZT....");
http.setRequestProperty("Content-Type", "application/json");
String data = "{\"transaction_id\":\"16327245\",
\"aadhaar_number\":\"456334521954\", \"captcha_value\":\"563452\"}";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
OutputStream stream = http.getOutputStream();
stream.write(out);
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/request-otp";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Method = "POST";
httpRequest.Headers["Authorization"] = "Basic bGl2ZV82MzAzZT....";
httpRequest.ContentType = "application/json";
var data = "{\"transaction_id\":\"16327245\",
\"aadhaar_number\":\"456334521954\", \"captcha_value\":\"563452\"}";
using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
{
   streamWriter.Write(data);
}
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
   var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
{
    "data": {
        "transaction_id": 16327245,
        "entity": "aadhaar_authentication",
        "aadhaar_number": "456334521954",
        "status": "OTP_GENERATED",
        "msg": "OTP has been sent to aadhaar linked mobile number"
    }
}

Request parameters

transaction_id

mandatory

integer Unique transaction ID which you have obtained previously while initiating the transaction. For example, 16327245

aadhaar_number

mandatory

string Aadhaar number is a 12-digit random number issued by the UIDAI. 4563-3452-1954

captcha_value

mandatory

string A numeric value of the captcha image that generated while initiating the transaction in the previous step. For example, 563452

Response Parameters

data

object contains all the details such transaction_id, entity, aadhaar_number, status, msg

transaction_id

integer Unique ID of the transaction

entity

string something that exists separately from something else and has its own identity

aadhaar_number

string Aadhaar number is a 12-digit random number issued by the UIDAI

status

string Return the status of the transaction OTP_GENERATED

msg

string Response message or notice related to the query

Verify OTP & Complete Verification

Use the below endpoint to verify OTP to complete the transaction

/uidai/aadhaar-authentication/verify-otp
curl -X POST https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp
-H "Authorization: Basic bGl2ZV82MzAzZT...."
-H "Content-Type: application/json"
-d "{\"transaction_id\":\"16327245\", \"otp_value\":\"863452\"}"
$url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
   "Authorization: Basic bGl2ZV82MzAzZT....",
   "Content-Type: application/json",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = '{"transaction_id":"16327245", "otp_value":"863452"}';
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Authorization", "Basic bGl2ZV82MzAzZT....");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};
var data = '{"transaction_id":"16327245", "otp_value":"863452"}';
xhr.send(data);
import requests
from requests.structures import CaseInsensitiveDict
url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp"
headers = CaseInsensitiveDict()
headers["Authorization"] = "Basic bGl2ZV82MzAzZT...."
headers["Content-Type"] = "application/json"
data = '{"transaction_id":"16327245", "otp_value":"863452"}'
resp = requests.post(url, headers=headers, data=data)
print(resp.status_code)
URL url = new URL("https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp");
HttpURLConnection http = (HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Authorization", "Basic bGl2ZV82MzAzZT....");
http.setRequestProperty("Content-Type", "application/json");
String data = "{\"transaction_id\":\"16327245\", \"otp_value\":\"863452\"}";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
OutputStream stream = http.getOutputStream();
stream.write(out);
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
var url = "https://ippocloud.com/api/v1
/uidai/aadhaar-authentication/verify-otp";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Method = "POST";
httpRequest.Headers["Authorization"] = "Basic bGl2ZV82MzAzZT....";
httpRequest.ContentType = "application/json";
var data = "{\"transaction_id\":\"16327245\", \"otp_value\":\"863452\"}";
using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
{
   streamWriter.Write(data);
}
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
   var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
{
    "data": {
        "transaction_id": 16327245,
        "entity": "aadhaar_authentication",
        "aadhaar_number": "456334521954",
        "status": "AUTHENTICATION_SUCCESS",
        "msg": "Aadhaar authentication using OTP has been successful"
    }
}

Request parameters

transaction_id

mandatory

integer Unique transaction ID which you have obtained previously while initiating the transaction. For example, 16327245

otp_value

mandatory

string OTP value that received to the aadhaar linked mobile number. 863452

Response Parameters

data

object contains all the details such transaction_id, entity, aadhaar_number, status, msg

transaction_id

integer Unique ID of the transaction

entity

string something that exists separately from something else and has its own identity

aadhaar_number

string Aadhaar number is a 12-digit random number issued by the UIDAI

status

string Return the status of the transaction AUTHENTICATION_SUCCESS

msg

string Response message or notice related to the query

Do you need help to implement this API? contact us