---
title: Aadhaar QR verification API
slug: api-marketplace/aadhaar-qr-verification-api
description: Learn how to download and extract your Aadhaar XML file easily using the Offline Aadhaar Web API. No more manual data entry on the UIDAI website! This comprehensive guide provides step-by-step instructions, including generating an OTP and retrieving the A
createdAt: 2022-10-03T11:20:57.000Z
---

## Introduction

Th&#x65;**&#x20;Aadhaar QR verification API** offers a fast and efficient solution for real-time Aadhaar card verification. It confirms data authenticity and extracts key personal details like name, date of birth, and gender directly from the QR code for secure validation.

**Key Benefits:**

- **Fraud Prevention:** Ensures only genuine Aadhaar cards are used, reducing fraud risk.
- **Error-Free:** Automates data entry, eliminating manual mistakes and enhancing accuracy.
- **Precision:** Provides real-time, accurate data extraction.
- **Faster Onboarding:** Speeds up user onboarding with instant data retrieval.

This solution enhances security, prevents errors, and accelerates onboarding, making it vital for identity management and fraud prevention.

**Current accuracy:** 92%

**Constraint:** Image should be clear enough for QR to be captured without noise.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/aadhaarQR/verifyAndFetchDetails
```
:::

:::CodeblockTabs
UAT Endpoint

```text
   POST https://api-preproduction.signzy.app/api/v3/aadhaarQR/verifyAndFetchDetails
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**       | **Required** |
| ------------- | ------------- | --------------------- | ------------ |
| image         | String        | Aadhaar QR code image | Mandatory    |

```json
{
  "image": "<Aadhaar QR code image>"
}
```

***

### Request Headers

| **Name&#x20;** | **Value**        | **Required** | **Description**                                                                                            |
| -------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-type   | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization  | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Code Samples

:::CodeblockTabs
Curl

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/aadhaarQR/verifyAndFetchDetails' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Authorization token>' \
--data '{
    "image": "<Image url of the aadhaar card qr code>"
}'
```

Node.js

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "image": "<Image url of the aadhaar card qr code>"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/aadhaarQR/verifyAndFetchDetails',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Authorization token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

Python

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "image": "<Image url of the aadhaar card qr code>"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Authorization token>'
}
conn.request("POST", "/api/v3/aadhaarQR/verifyAndFetchDetails", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

GO

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/aadhaarQR/verifyAndFetchDetails"
  method := "POST"

  payload := strings.NewReader(`{
    "image": "<Image url of the aadhaar card qr code>"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Authorization token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**                      | **Data Type** | **Description**                                                                                                                                                                  |
| ---------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| result                             | Object        | Contains the response for the Aadhaar card holder.                                                                                                                               |
| result.isQRVerified                | String        | Possible values are true, false and empty string.<br />true, if QR code is verified<br />false, if QR code is not verified<br />empty string, if QR code is not digitally signed |
| result.isQRSecure                  | String        | Represents if the QR code is secure or not<br />true, if QR code is secure<br />false, if QR code is not secure                                                                  |
| result.demographicData             | Object        | Demographic data of the aadhaar card holder                                                                                                                                      |
| result.demographicData.name        | String        | Name of the aadhaar card holder                                                                                                                                                  |
| result.demographicData.dob         | String        | The data of birth of the aadhaar card holder                                                                                                                                     |
| result.demographicData.gender      | String        | Gender of the aadhaar card holder                                                                                                                                                |
| result.demographicData.pincode     | String        | Pincode of the aadhaar card holder                                                                                                                                               |
| result.demographicData.postOffice  | String        | Postoffice of the aadhaar card holder                                                                                                                                            |
| result.demographicData.state       | String        | state of the aadhaar card holder                                                                                                                                                 |
| result.demographicData.district    | String        | District of the aadhaar card holder                                                                                                                                              |
| result.demographicData.subDistrict | String        | Subdistrict of the aadhaar card holder                                                                                                                                           |
| result.demographicData.vtc         | String        | Village/town/city of the aadhaar card holder                                                                                                                                     |
| result.demographicData.landmark    | String        | Landmark of the aadhaar card holder                                                                                                                                              |
| result.demographicData.street      | String        | Street of the aadhaar card holder                                                                                                                                                |
| result.demographicData.location    | String        | Location of the aadhaar card holder                                                                                                                                              |
| result.demographicData.UID         | String        | Masked UID of the aadhaar card holder                                                                                                                                            |
| result.demographicData.careOf      | String        | CareOf of the aadhaar card holder                                                                                                                                                |
| result.demographicData.house       | String        | House no of the aadhaar card holder                                                                                                                                              |
| result.demographicData.yob         | String        | Year of birth of the aadhaar card holder                                                                                                                                         |

:::CodeblockTabs
200

```json
{
    "result": {
        "isQRVerified": "true/false",
        "isQRSecure": "true/false",
        "demographicData": {
            "name": "...name of the aadhaar card holder...",
            "dob": "...date of birth...",
            "gender": "...gender...",
            "pincode": "...pincode...",
            "postOffice": "...postOffice...",
            "state": "...state...",
            "district": "...district...",
            "subDistrict": "...subDistrict...",
            "vtc": "...village/town/city...",
            "landmark": "...landmark...",
            "street": "...street...",
            "location": "...location...",
            "UID": "...masked UID number...",
            "careOf": "...care of ...",
            "house": "...house number...",
            "yob": "...year of birth..."
        }
    }
}
```

400

```json
// Passing multiple QRs in the same image
{
  "error": {
    "name": "error",
    "message": "Multiple QR codes detected",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}

// Passing image of size more than 10 MB
{
  "error": {
    "name": "error",
    "message": "File size exceeds limit",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}

// Passing image with no QR code
{
  "error": {
    "name": "error",
    "message": "No QR code detected",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}

// Passing image formate other than png, jpeg or jpg
{
  "error": {
    "name": "error",
    "message": "Unsupported file format",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}

// Passing invalid image URL
{
  "error": {
    "name": "error",
    "message": "Invalid image URL",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}
```

401

```json
// If Authorization token is not passed
{
    "message": "No API key found in request"
}

// If Authorization token is invalid
{
    "message": "Invalid authentication credentials"
}
```

422

```json
// QR code is not readable from the image
{
  "error": {
    "name": "error",
    "message": "Failed to read the QR code, try with clear image",
    "status": 422,
    "reason": "UNPROCESSABLE_ENTITY",
    "type": "Bad Request",
    "statusCode": 422
  }
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

### Error Parameter

| **PARAMETER NAME** | **DESCRIPTION**                    |
| ------------------ | ---------------------------------- |
| error              | This parameter contains the error. |
| error.statusCode   | Request Status code from Signzy    |
| error.name         | the name of the error              |
| error.message      | the error message                  |
| error.status       | status of the api                  |
| error.reason       | Reason for error                   |
| error.type         | Type of the error                  |

### Error Codes

| **CODE** | **DESCRIPTION**       | **INTERPRETATION**                                |
| -------- | --------------------- | ------------------------------------------------- |
| 400      | Bad Request           | Input Parameter has a missing required parameter  |
| 401      | Authorization Failed  | Authorization token is invalid.                   |
| 409      | Upstream Error        | Upstream is down, please contact support          |
| 500      | Internal Server Error | Internal error at Signzy, please contact support. |



:::hint{type="success"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

