> ## Documentation Index
> Fetch the complete documentation index at: https://telr-docs.cashfree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate OTP to Verify Aadhaar

> Use this API to generate OTP for a given aadhar number. The mobile number linked with the aadhaar information will receive the generated OTP. The generated OTP will be valid for 10 minutes. Use the generated OTP for offline aadhaar verification. View the [test data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-okyc) and use the information to trigger the validations. The test data are usable only in the test environments such as sandbox.



## OpenAPI

````yaml post /offline-aadhaar/otp
openapi: 3.0.0
info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  title: Cashfree Verification API's.
  version: '2023-12-18'
  description: >-
    Cashfree's Verification APIs provide different types of verification to our
    merchants.
servers:
  - description: Sandbox Server
    url: https://sandbox.cashfree.com/verification
  - description: Production Server
    url: https://api.cashfree.com/verification
security: []
tags:
  - name: Aadhaar
    description: Operations related to Aadhaar verification.
  - name: BAV V2
    description: Operations related to Bank account verification v2.
  - name: PAN
    description: Operations related to PAN verification.
  - name: Digilocker
    description: Operations related to Digilocker verification.
  - name: E-sign
    description: Operations related to E-sign verification.
  - name: Reverse Penny Drop
    description: Operations related to Reverse Penny Drop verification.
  - name: IP
    description: Operation related to IP verification.
  - name: UPI
    description: Operations related to UPI verification.
  - name: Passport
    description: Operation related to Passport verification.
  - name: CIN
    description: Operation related to CIN verification.
  - name: Name Match
    description: Operation related to Name Match verification.
  - name: PAN to GSTIN
    description: Operation related to PAN to GSTIN.
  - name: Face Match
    description: Operation related to Face Match verification.
  - name: Voter ID
    description: Operation related to Voter ID verification.
  - name: Reverse Geocoding
    description: Operation related to Reverse Geocoding.
  - name: Liveliness
    description: Operation related to Liveliness.
  - name: Vehicle RC
    description: Operation related to Vehicle RC verification.
  - name: Driving License
    description: Operation related to Driving License verification.
  - name: GSTIN
    description: Operation related to GSTIN verification.
  - name: Account Aggregator
    description: Operations related to Account aggregator.
  - name: OTPLess
    description: Operations related to OTPLess Verification.
  - name: 1-Click
    description: Operations related to 1-Click.
  - name: BharatOCR
    description: Operations related to BharatOCR.
paths:
  /offline-aadhaar/otp:
    post:
      tags:
        - Aadhaar
      summary: Generate OTP to Verify Aadhaar
      description: >-
        Use this API to generate OTP for a given aadhar number. The mobile
        number linked with the aadhaar information will receive the generated
        OTP. The generated OTP will be valid for 10 minutes. Use the generated
        OTP for offline aadhaar verification. View the [test
        data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-okyc)
        and use the information to trigger the validations. The test data are
        usable only in the test environments such as sandbox.
      operationId: VrsOfflineAadhaarSendOtp
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
      requestBody:
        $ref: '#/components/requestBodies/OfflineAadhaarSendOtpRequest'
      responses:
        '200':
          $ref: '#/components/responses/OfflineAadhaarSendOtpResponse'
        '400':
          $ref: '#/components/responses/Response400SendOtp'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500AllCases'
        '502':
          $ref: '#/components/responses/Response502V2AuthorizedSourceDown'
      security:
        - XClientID: []
          XClientSecret: []
components:
  parameters:
    x_cf_signature:
      description: Send the signature if IP is not whitelisted.
      name: x-cf-signature
      in: header
      required: false
      schema:
        type: string
      example: ''
  requestBodies:
    OfflineAadhaarSendOtpRequest:
      description: Find the request parameters to generate OTP for a given aadhar number
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OfflineAadhaarSendOtpRequestSchema'
  responses:
    OfflineAadhaarSendOtpResponse:
      description: Success response for generating the OTP for offline aadhaar verification
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OfflineAadhaarSendOtpResponseSchema'
          examples:
            OTP Generated:
              value:
                status: SUCCESS
                message: OTP sent successfully
                ref_id: 21637861
            Mobile Not Linked:
              value:
                status: SUCCESS
                message: Aadhaar not linked to mobile number
                ref_id: 21637861
            Invalid Aadhaar:
              value:
                ref_id: 208
                status: INVALID
                message: Invalid Aadhaar Card
    Response400SendOtp:
      description: Validation errors for Generate OTP to Verify Aadhaar API
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Aadhaar Number Length Invalid:
              $ref: '#/components/examples/AadhaarNumberLengthIsNotCorrect'
            Aadhaar Number Invalid:
              $ref: '#/components/examples/InvalidAadhaarFormat'
            Aadhaar Number Empty:
              $ref: '#/components/examples/AadhaarNumberFieldIsEmpty'
            Client ID/Client Secret in Missing:
              $ref: '#/components/examples/XClientIdMissing'
            Using Test Credentials In Prod:
              $ref: '#/components/examples/UsingTestCredentialsInProd'
    Response401:
      description: Invalid client ID and client secret combination
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Invalid client ID and client secret combination:
              value:
                type: authentication_error
                code: authentication_failed
                message: Invalid clientId and clientSecret combination
    Response403:
      description: Authentication error (IP not whitelisted)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            IP not whitelisted:
              value:
                type: authentication_error
                code: ip_validation_failed
                message: >-
                  IP not whitelisted your current ip is 106.51.91.104.For IP
                  whitelisting assistance, visit our guide at
                  https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification
    Response409:
      description: >-
        Conflict error for requesting another OTP for the same aadhaar within 30
        seconds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Request for same aadhaar within 30s:
              value:
                type: validation_error
                code: verification_pending
                message: Otp generated for this aadhaar, please try after some time
    Response422:
      description: Validation error because of insufficient balance to process this request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Insufficient balance:
              value:
                type: validation_error
                code: insufficient_balance
                message: Insufficient balance to process this request
    Response429:
      description: Rate limit exceed error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Rate limit error per operation:
              value:
                type: rate_limit_error
                code: too_many_requests_per_operation
                message: Too many requests for this operation, rate limit reached
            Rate limit error per IP:
              value:
                type: rate_limit_error
                code: too_many_requests_per_ip
                message: Too many requests from the IP, rate limit reached
    Response500AllCases:
      description: Internal errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: Unable to validate, please retry later
                error:
                  refId: 209
            Unknown Error Occured:
              value:
                type: internal_error
                code: api_error
                message: something went wrong, please try after some time
    Response502V2AuthorizedSourceDown:
      description: Gateway error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Bad Gateway:
              value:
                type: internal_error
                code: verification_failed
                message: >-
                  Authorised source is temporarily unavailable, please try again
                  shortly
  schemas:
    OfflineAadhaarSendOtpRequestSchema:
      type: object
      required:
        - aadhaar_number
      example:
        aadhaar_number: '655675523712'
      properties:
        aadhaar_number:
          description: >-
            It is the unique 12-digit identification number issued by the Unique
            Identification Authority of India (UIDAI).
          type: string
          example: '655675523712'
          default: '655675523712'
    OfflineAadhaarSendOtpResponseSchema:
      type: object
      example:
        ref_id: '12345'
        status: SUCCESS
        message: OTP send successfully.
      properties:
        ref_id:
          type: string
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes.
          example: '12345'
        status:
          type: string
          description: >-
            It displays the status of the API request. Possible values are:

            - `SUCCESS`: OTP generated successfully / Aadhaar not linked to
            mobile number.

            - `INVALID`: Aadhaar card invalid.
          example: SUCCESS
        message:
          type: string
          description: It displays details about the success or failure of the API request.
          example: OTP send successfully.
    ErrorResponseSchema:
      type: object
      properties:
        code:
          type: string
          example: x-client-id_missing
        error:
          type: object
          example:
            ref_id: 102
        message:
          type: string
          example: x-client-id is missing in the request.
          description: It displays the outcome of the error.
        type:
          type: string
          example: validation_error
          description: It displays the type of error.
  examples:
    AadhaarNumberLengthIsNotCorrect:
      value:
        type: validation_error
        code: aadhaar_invalid
        message: aadhaar Number should contain 12 characters.
    InvalidAadhaarFormat:
      value:
        type: validation_error
        code: aadhaar_invalid
        message: Please enter aadhaar number in numeric format
    AadhaarNumberFieldIsEmpty:
      value:
        type: validation_error
        code: aadhaar_empty
        message: Please enter aadhaar number in the request
    XClientIdMissing:
      value:
        type: validation_error
        code: x-client-id_missing
        message: x-client-id is missing in the request.
    UsingTestCredentialsInProd:
      value:
        type: validation_error
        code: x-client-secret_value_invalid
        message: Client secret belongs to test environment
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client ID. You can find your ID in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).

````