---
title: Verify Account API
slug: v2-apis/verify-account-api
description: Learn how to use the Digilocker API to verify the existence of a Digilocker account using a mobile number or Aadhaar number. Obtain the necessary access token and authorization header from the login call, and pass either the Aadhaar number or phone number
createdAt: 2022-09-19T07:28:09.000Z
---

## Introduction

There are people with or without Digilocker account. This API verifies the account based on the credentials entered and displays status of existance and digilocker id.

This API will check whether a digilocker account corresponding to the credentials entered exists. If exists then it will display true along with the digilockerid. We can verify existance of the account either by passing mobile number or by passing Aadhaar Number.

## How to call the API

You are required to pass the access token received from the [login](https://docs.signzy.com/sandboxapis) call, an authorization header in the request verify account request along with Aadhaar number or phone number.

## API Input Guidelines

Need to pass either mobileNumber or aadhaarNumber.

### Sample Curl&#x20;

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://preproduction.signzy.tech/api/v2/patrons/..patronId../digilockers' \


--header 'Authorization: <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task": "verifyAccount",
    "essentials": {
        "aadhaarNumber": "<Adhaar Number>" 
    }
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://signzy.tech/api/v2/patrons/..patronId../digilockers' \


--header 'Authorization: <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task": "verifyAccount",
    "essentials": {
        "aadhaarNumber": "Adhaar Number>" 
    }
}'
```
:::
::::

### Input Parameters

| **Parameter Name&#x20;** | **Required/Optional**  | **Description**                                        |
| ------------------------ | ---------------------- | ------------------------------------------------------ |
| Authorization            | Required               | Contains the id parameter returned from the login step |
| Content-Type             | Required               | application/json                                       |
| task                     | Required               | Type of task to be performed.                          |
| essentials               | Required               | Essential part of the request body                     |
| essentials.aadhaarNumber | conditionally Required | Aadhaar number                                         |
| essentials.mobileNumber  | conditionally Required | Phone number                                           |

### Sample Response

```json
{
    "essentials": {
        "aadhaarNumber": " "
    },
    "id": " ",
    "patronId": " ",
    "task": "verifyAccount",
    "result": {
        "registered": true,
        "digilockerid": ""
    }
}
```

### Response Parameter

| **Parameter Name&#x20;** | **Description**                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------ |
| essentials               | Essential part of request                                                                              |
| essentials.aadharNumber  | Aadhaar Number of digilocker account holder.                                                           |
| id                       | Unique user Id                                                                                         |
| patronId                 | Unique PatronID                                                                                        |
| task                     | Type of task to be performed - "verifyAccount"                                                         |
| result                   | Block containing response of the API hit.                                                              |
| result.registered        | It describes whether digilocker account exists for entered aadhaarNumber or phoneNumber ("true/false") |
| result.digilockerid      | It is the digilockerid of the account                                                                  |

***

:::hint{type="info"}
### 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](mailto\:help@signzy.com).
:::

