---
title: UDIN Get OTP
slug: api-marketplace/udin-get-otp
description: Learn how to create Aadhaar card identity objects and extract offline Aadhaar information using API endpoints. The first endpoint enables the creation of identity objects with parameters like type, email, callback URL, and images. Get the details of the c
createdAt: 2023-04-19T11:39:12.000Z
---

### Introduction

The UDIN (Unique Document Identification Number) Get OTP API is designed to facilitate the generation of a One-Time Password (OTP) sent to a Requester's mobile number and Email ID. These OTPs will be used in the UDIN Fetch Details API for accessing detailed information about UDIN.

***

### API Endpoint's

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/udin/getOtp
```
:::

:::CodeblockTabs
UAT Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/udin/getOtp
```
:::

### Request headers

| **Name**      | **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. |

### Request body parameters

| Parameter    | Data Type | Description                    | Mandatory  |
| ------------ | --------- | ------------------------------ | ---------- |
| udinNumber   | String    | UDIN number to be fetched      | Mandatory  |
| name         | String    | Name of the requester.         |  Mandatory |
| mobileNumber | String    | Mobile number of the requester | Mandatory  |
| email        | String    | Email of the requester         | Mandatory  |

### Request body

```json
{
 "udinNumber": "1920371ZZSBGI4NCRO",
 "name": "Rama",
 "mobileNumber": "87927XXXXX",
 "email": "ramakrishna.s@signzy.com"
}

```

### Code Samples

***

:::CodeblockTabs
Curl

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/udin/getOtp' \
--header 'Content-Type: application/json' \
--header 'Authorization; Authorization' \
--data-raw '{
 "udinNumber": "1920371ZZSBGI4NCRO",
 "name": "Rama",
 "mobileNumber": "87927XXXXX",
 "email": "ramakrishna.s@signzy.com"
}'
```

Node

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "url": "xxxxxx",
  "password": "yyyyyyy"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/aadhaar/offlineExtraction',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<your access 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({
  "url": "xxxxxx",
  "password": "yyyyyyy"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<your access token>'
}
conn.request("POST", "/api/v3/aadhaar/offlineExtraction", 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/aadhaar/offlineExtraction"
  method := "POST"

  payload := strings.NewReader(`{
   "url":"xxxxxx",
   "password":"yyyyyyy"
}`)

  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", "<your access 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    | The main container for the response information. |
| result.token | String    | Token ID.                                        |

### Response body

:::CodeblockTabs
200

```json
{
    "result": {
        "token": "666980cd8963460061860667"
    }
}



```

400

```json
// Invalid UDIN
{
  "error": {
    "name": "error",
    "message": "Invalid UDIN Number",
    "status": 400,
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
  }
}

// Invalid mobile number
{
  "error": {
    "name": "error",
    "message": "Invalid Mobile number",
    "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"
}
```

409

```json
{
    "error": {
        "statusCode": 409,
        "name": "error",
        "message": "Upstream Down",
        "status": 409
    }
}
```
:::

***





**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!


