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

# Verify Account

> Use this API to verify whether a mobile number or Aadhaar number is already registered with DigiLocker. 


View the [test data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#digilocker-verify-account) and use the information to trigger the validations. The test data can be used only in the sandbox environment.



## OpenAPI

````yaml post /digilocker/verify-account
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: UPI Penny Drop
    description: Operations related to UPI Penny Drop verification.
  - name: Mobile Penny Drop
    description: Operations related to Mobile 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: 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: Smart OCR
    description: Operations related to Smart OCR.
  - name: Geocoding
    description: Operations related to Geocoding.
  - name: Udyam
    description: Operation related to Udyam verification.
  - name: PAN to Udyam
    description: Operation related to PAN to Udyam.
paths:
  /digilocker/verify-account:
    post:
      tags:
        - Digilocker
      summary: Verify Account
      description: >-
        Use this API to verify whether a mobile number or Aadhaar number is
        already registered with DigiLocker. 



        View the [test
        data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#digilocker-verify-account)
        and use the information to trigger the validations. The test data can be
        used only in the sandbox environment.
      operationId: VrsDigilockerVerifyAccount
      requestBody:
        $ref: '#/components/requestBodies/DigiLockerVerifyAccountRequest'
      responses:
        '200':
          $ref: '#/components/responses/DigiLockerVerifyAccountResponse'
        '400':
          $ref: '#/components/responses/Response400DigiLockerVerifyAccount'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409DigiLockerResponse'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500V2'
        '502':
          $ref: '#/components/responses/Response502V2AuthorizedSourceDown'
      security:
        - XClientID: []
          XClientSecret: []
components:
  requestBodies:
    DigiLockerVerifyAccountRequest:
      description: Find the request parameters to verify a Digilocker account.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DigiLockerVerifyAccountRequestSchema'
          examples:
            mobileNumber:
              $ref: '#/components/examples/mobile_number'
            aadhaarNumber:
              $ref: '#/components/examples/aadhaar_number'
  responses:
    DigiLockerVerifyAccountResponse:
      description: Success response for digilocker account detail.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DigiLockerVerifyAccountResponseSchema'
          examples:
            AccountExistsWithMobile:
              value:
                verification_id: ABC00123
                reference_id: 12345
                mobile_number: 1234567899
                status: ACCOUNT_EXISTS
                digilocker_id: 8aa626bf-34aa-5ffc-a123-f69207e129a7
            AccountExistsWithAadhaar:
              value:
                verification_id: ABC00123
                reference_id: 12345
                aadhaar_number: XXXXXXXX3712
                status: ACCOUNT_EXISTS
                digilocker_id: 8aa626bf-34aa-5ffc-a123-f69207e129a7
            AccountNotFound:
              value:
                verification_id: ABC00123
                reference_id: 12345
                mobile_number: 123456789
                status: ACCOUNT_NOT_FOUND
    Response400DigiLockerVerifyAccount:
      description: Validation errors for Digilocker Verify Account API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Verification ID Missing:
              $ref: '#/components/examples/VerificationIdMissing'
            Verification ID With Special Chars:
              $ref: '#/components/examples/VerificationIdWithSpecialCharacter'
            Verification Id character limit exceeded:
              value:
                type: validation_error
                code: verification_id_length_exceeded
                message: verification_id can include a maximum of 50 characters.
            Invalid Mobile Number:
              value:
                type: validation_error
                code: mobile_number_value_invalid
                message: Mobile number entered is invalid.
            Invalid Aadhaar Format:
              value:
                type: validation_error
                code: aadhaar_invalid
                message: Please enter aadhaar number in numeric format
            Parameter Missing:
              value:
                type: validation_error
                code: invalid_request
                message: provide mobile_number or aadhaar_number.
    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
            x-cf-signature header missing:
              value:
                type: validation_error
                code: authentication_failed
                message: x-cf-signature missing in the request header
    Response409DigiLockerResponse:
      description: >-
        Conflict error because of an existing verification ID for the DigiLocker
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Request with same verification id:
              value:
                type: validation_error
                code: verification_id_value_invalid
                message: >-
                  verification_id already exists, please provide new
                  verification_id
    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
    Response500V2:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: something went wrong
    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:
    DigiLockerVerifyAccountRequestSchema:
      type: object
      required:
        - verification_id
      properties:
        verification_id:
          description: >-
            It is a unique ID you create to identify the API request. The
            maximum character limit is 50. Alphanumeric, period (.), hyphen (-).
            and underscore ( _ ) are allowed.
          type: string
          example: ABC00123
        mobile_number:
          type: string
          description: >-
            It is the mobile number of a user. Either an Aadhaar number or
            mobile is required to verify whether a Digilocker account exists.
            **(conditonal mandatory)**
          example: '9988777666'
        aadhaar_number:
          description: >-
            It is the unique 12-digit identification number issued by the Unique
            Identification Authority of India (UIDAI). Either an Aadhaar number
            or mobile is required to verify whether a Digilocker account exists.
            **(conditonal mandatory)**
          type: string
          example: '655675523712'
    DigiLockerVerifyAccountResponseSchema:
      type: object
      properties:
        verification_id:
          type: string
          description: It displays the unique ID you created to identify this API request.
          example: ABC00123
        reference_id:
          type: integer
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes. format: `int64`.
          example: 12345
        mobile_number:
          type: string
          description: Mobile number of the individual.
          example: '1234567899'
        aadhaar_number:
          type: string
          description: Masked Aadhaar number of the individual.
          example: XXXXXXXX3712
        status:
          type: string
          description: >-
            It displays the status of the digilocker account. Possible values
            are:
              - `ACCOUNT_EXISTS`: Digilocker account exists
              - `ACCOUNT_NOT_FOUND`: Digilocker account not found
          example: ACCOUNT_EXISTS
        digilocker_id:
          type: string
          description: It is a unique 36-character DigiLocker ID of the user account.
          example: 8aa626bf-34aa-5ffc-a123-f69207e129a7
    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:
    mobile_number:
      summary: Mobile Number
      description: Verify digilocker account with mobile number.
      value:
        verification_id: ABC001238
        mobile_number: '101340612345'
    aadhaar_number:
      summary: Aadhaar Number
      description: Verify digilocker account with aadhaar number.
      value:
        verification_id: ABC001238
        aadhaar_number: '655675523712'
    VerificationIdMissing:
      value:
        type: validation_error
        code: verification_id_missing
        message: verification_id is missing in the request.
    VerificationIdWithSpecialCharacter:
      value:
        type: validation_error
        code: verification_id_value_invalid
        message: >-
          verification_id can include only alphanum, dot, hyphen and
          underscores.
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Your unique client identifier issued by Cashfree. You can find this in
        your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        The secret key associated with your client ID. Use this to authenticate
        your API requests. You can find this in your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).

````