> ## Documentation Index
> Fetch the complete documentation index at: https://deepvue-2e0dbadd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify OTP

> This API will validate the OTP entered by the user to authenticate with UIDAI. Once successfully validated response will have the below details.



## OpenAPI

````yaml POST /v2/ekyc/aadhaar/verify-otp
openapi: 3.0.2
info:
  title: Deepvue.tech Developers' Guide
  description: >-
    Deepvue.tech's APIs and SDKs are a No-Code Solution to Document Digitization
    and Verification for Businesses.
  version: v1
  x-logo:
    url: https://deepvue.tech/wp-content/uploads//2022/01/deepvue-logo1-1.svg
servers:
  - url: https://production.deepvue.tech
security:
  - BearerAuth: []
    ApiKeyAuth: []
tags:
  - name: Authorization
    description: |-
      - You need an Authorized Access Token to access any of the Platform APIs.
      - One Access Token will be valid for only 24 hours.
      - After 24 hours, you can renew the token by using the Authorize Endpoint.
      - This will issue another access_token valid for 24 hrs.
  - name: Aadhaar Ekyc V2
    description: New streamlined APIs for Aadhaar eKYC
  - name: Offline Aadhaar eKYC
    description: >-
      Offline Aadhaar KYC, or OKYC, is a legally compliant KYC method as per
      UIDAI guidelines.   
                              Your customers can provide their Aadhaar number and verify with an OTP sent to their Aadhaar-linked mobile number, to access a downloadable XML file with their Aadhaar details.   

      **How does Offline Aadhaar Verification work?**    
                              **Provide Consent**:  Customers agree or disagree to continue at the initial screen.   
                              **Share Aadhaar Number**: Customers provide their Aadhaar number to proceed with the verification.   
                              **Verify with OTP**: Verify with an OTP sent to their Aadhaar-linked mobile number by UIDAI, to access a downloadable XML file with their Aadhaar details in a share code manner.    
                              **Realtime face match** for liveness detection: The Aadhaar Offline document has Name, Address, Photo, Gender, DOB. Optionally, the photo in the UIDAI Issued Aadhaar document can be matched with customers' live photo or a selfie in real time to ensure liveness checks.   

      *You can simply integrate Offline Aadhaar eKYC within your application
      with no-code and in no time with our Deepvue.tech Offline Aadhaar eKYC
      SDKs.*    


      **Below are the integration guides to integrate the platform specific
      SDKs:**   

      **Android SDK** :
      https://github.com/deepvue-tech/deepvue-aadhaar-offline-ekyc-android-sdk   
                              **iOS SDK** : https://github.com/deepvue-tech/deepvue-aadhaar-offline-ekyc-ios-sdk   
                              **React-Native SDK** : https://github.com/deepvue-tech/deepvue-aadhaar-offline-ekyc-react-sdk    
                              **Flutter SDK** : https://pub.dev/packages/aadhaar_offline_ekyc    

      **NOTE**:   
                  
              As per the compliances by UIDAI on sharing and storage of Aadhaar number is not allowed.    
              
              Service Providers shall not share, publish or display either Share Code or XML file or its contents with anyone else.   
              Any non-compliance of these actions shall invite actions under Sections 17 and 25 of The Aadhaar (Authentication) Regulation, 2016,    
              Sections 4 and 6 of The Aadhaar (Sharing of Information) Regulation, 2016 and Sections 29(2), 29 (3), and 37 of The Aadhaar Act, 2016.   

              Consent should be mandatorily stored at the company end to proceed with verification.   

      If you want to integrate Aadhaar eKYC in your web application or want to
      build your own customized workflow you can use our Aadhaar eKYC APIs
      detailed below.   


      Embed offline eKYC Aadhaar flow to verify consumers on your application
      using a simple flow.    
                                      - **Initiate Session**: This API allows the platform to initiate a session to get the captcha before passing the Aadhaar number of the customer.    
                                      - **Generate OTP**: This API allows the platform to pass the Aadhaar number to generate OTP to the linked mobile number.    
                                      - **Verify OTP**: This API allows the platform to pass the OTP to Deepvue.tech to fetch the customer's Aadhaar information from UIDAI.    

      If the customer or the platform wishes to restart the session, a new
      captcha can be generated using the Reload Captcha API.
  - name: Digilocker
    description: >-
      Digilocker is an initiative under Digital India Program which aims to
      remove the dependency on physical documents and power the sharing of
      verified electronic documents across authorised agencies.   


      **Benefits of Digilocker**    
                              1. Documents can be shared online, accessed anytime, anywhere.   
                              2. Documents can be authenticated by the users, legally on a par with originals.   
                              3. It's simple to use and very convenient.   
                              4. Documents are issued directly by the registered issuers such as Income Tax Department, CBSE, Registrar Office, etc.    

      **Product Flow**   

      **Initiate Session** : This API creates a session in which DigiLocker
      journey can be completed with other APIs in the flow.   
                              **Get User Access Token** : This API allows the platform to get user access token from Digilocker by passing the authorisation code generated from Digilocker.   
                              **Get Issued Files** : This API allows the platform to fetch a list of issued documents from Digilocker.    
                              **Download e-Aadhar** : This API allows the platform to download the Aadhaar XML from Digilocker.    
                              **Download File** : This API allows the platform to download the file from Digilocker by passing the URI for a particular document.    
  - name: KYC APIs
    description: >-
      Verify Aadhaar, PAN, GSTIN, Bank Account, and UPI details in real time for
      quick KYC checks.
  - name: Document OCR
    description: >-
      Our systems use Modern & Latest OCR technology to scan the document images
      for field’s like full name, dob, address, etc. on the photo IDs and
      exctract these fields as key-value pairs.
  - name: Document Forensics
    description: >-
      Set of APIs that help with document forensic checks like template
      validation, image quality, photocopy, and spoof checks.
  - name: Face Forensics
    description: >-
      APIs for facial recognition and liveliness verification in real time.    

      The Face Match API employs advanced algorithms for reliable facial
      matching, crucial for secure access control and compliance.   

      The Passive Liveness API enhances security by detecting and confirming the
      liveliness of faces during authentication, providing an additional layer
      of protection against impersonation and fraud.   
  - name: Async KYC APIs
    description: >-
      Verify other Identity documents such as Driving License, Vehicle
      Registration Certificate etc. in real time for fast KYC checks.    
              These are Asynchronous APIs which return a request ID and use a webhook mechanism to return the response back to your servers.    
              You can then use this request ID and feed this into our GET API to consume the response.
  - name: GST APIs
    description: >-
      Set of APIs that help with GST Registered business verification and
      onboarding.
  - name: GST Taxpayer APIs
    description: >-
      The GST Taxpayer APIs are provided by the GSTN for public usage. These
      APIs, together, mirror the GST Portal.   


      Therefore, you can use these APIs to integrate GST compliance into your
      workflow itself.   


      Use the following workflow to access the GST Taxpayer APIs:   


      **First**, the GST taxpayer is authenticated using **OTP
      Verification**.   


      **Second**, after successful authentication, the GST Taxpayer APIs can be
      accessed.   
         i. **Ledger APIs** - Fetch the taxpayer's ledger like a) Cash ITC Balance, b) Cash Ledger, c) ITC Ledger.   
         ii. **Returns APIs** - Fetch the taxpayer's detailed summaries of GSTR -1 and GSTR -3B Returns.   
  - name: Taxpayer APIs
    description: |-
      Taxpayer APIs includes TAN Verification.   

       Taxpayer APIs help businesses verify their vendors, customers & employees using TAN. APIs also provide publicly available data such as name, address, and contact details that can be verified against physical documents.   
  - name: ITR APIs
    description: |-
      ITR APIs includes ITR Verification APIs including 26AS.   

       ITR APIs helps businesses download ITR information, such as ITR ID, Filing Year, Acknowledgement Number, ITR Form, Filing Date, ITR status, etc..    
  - name: MSME APIs
    description: >-
      Set of APIs that help with MSME Registered business verification and
      onboarding.
  - name: MCA APIs
    description: >-
      Set of APIs that help fetch MCA's Director Master Data & Company Master
      Data.
  - name: Financial Services
    description: >-
      Suite that provides you whole array of APIs to serve multiple financial
      services and fetch data for an organisation or individual from various
      data sources in a streamlined manner.   


      Some of the key things that you can do here are:   


      i.Fetch the Credit Report from any of our partner credit bureaus.   

      ii.Fetch customer's Customer Data Pull basis mobile number and name to
      simplify your onboarding.
  - name: Account Aggregator
    description: >-
      Account Aggregators(AAs) are regulated entities that facilitate consented
      sharing of financial data by utilising the DEPA framework. They act as the
      bridge between data providers such as banks, and data consumers such as
      lenders—to enable the sharing of a user’s financial data based on their
      explicit consent.   
              Deepvue currently provides AA-related services in close partnership with a fully-licensed AA.
paths:
  /v2/ekyc/aadhaar/verify-otp:
    post:
      tags:
        - Aadhaar Ekyc V2
      summary: Aadhaar Ekyc Verify Otp
      description: This API is used to verify the PAN Number.
      operationId: Aadhaar_Ekyc_Verify_Otp_v2_ekyc_aadhaar_verify_otp_post
      parameters:
        - required: true
          schema:
            title: Otp
            type: string
            description: >-
              OTP received on the registered mobile number, with a validity of
              10 minutes.
          name: otp
          in: query
        - required: true
          schema:
            title: Reference Id
            type: string
            description: reference_id received from the Generate OTP API Endpoint.
          name: reference_id
          in: query
        - required: true
          schema:
            title: Consent
            type: string
            description: >-
              Y/N based on whether your customer has given consent for
              validating their KYC. This is mandatory as per regulations.
          name: consent
          in: query
        - required: true
          schema:
            title: Purpose
            type: string
            description: >-
              The purpose of the KYC check, which is mandatory as per
              regulations.
          name: purpose
          in: query
        - required: false
          schema:
            title: Mobile Number
            type: string
            description: >-
              10-digit mobile number to check whether it is the same mobile
              linked to Aadhaar on which the OTP was sent.
          name: mobile_number
          in: query
        - required: false
          schema:
            title: Generate Pdf
            type: boolean
            default: false
            description: >-
              True or False, depending upon whether pdf needs to be generated or
              not.
          name: generate_pdf
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_200_SUCCESSFUL
              examples:
                200 - Aadhaar eKYC Successful:
                  summary: Aadhaar eKYC completed successfully
                  value:
                    code: 200
                    timestamp: 1738243999577
                    transaction_id: f6efc218742a405c8dd65cf19c13b878
                    sub_code: SUCCESS
                    message: Aadhaar eKYC Successful
                    data:
                      address:
                        careOf: S/O H. Nue Mahammed
                        country: India
                        district: Bangalore
                        house: NO. 6
                        landmark: ''
                        locality: MTS LAYOUT J X NAGAR 51TH PHASE
                        pin: '561118'
                        postOffice: J P Nagar
                        state: Karnataka
                        street: 19TH MAIN
                        subDistrict: ''
                        vtc: Bangalore
                      dateOfBirth: 28-06-1999
                      email: e2afb1d691d72a535b501053e6291abdb51c05cccc7c08b4439ab3e
                      gender: M
                      generatedAt: '1738304139979'
                      maskedNumber: xxxx-xxxx-8091
                      name: Mohammed Nihar
                      phone: >-
                        ad0e19163c4ff90313ce2b1457ea0687fbfbf0f344566e50bed07f60ae064
                      photo: rWHcAdajJoopFSYqnjNVXYebkngc0U
                      aadhaar_linked_mobile_match: Yes/No
                      document_pdf: YqnjNVXYebkngc0U
        '400':
          description: BAD_REQUEST (Invalid Input / Parameters)
          content:
            application/json:
              schema:
                title: Response 400 - Invalid Session Id / Invalid Reference Id
                oneOf:
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_400_INVALID_SESSION
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_400_INVALID_REFERENCE_ID
              examples:
                400 - Invalid Session Id:
                  summary: Invalid or expired session
                  value:
                    code: 400
                    timestamp: 1738243998047
                    transaction_id: c9a8b14d68374fd5ae688195cb54372d
                    sub_code: INVALID_INPUT
                    message: Invalid Session Id
                400 - Invalid Reference Id:
                  summary: Invalid reference ID
                  value:
                    code: 400
                    timestamp: 1738332826135
                    transaction_id: 0dfc7b5dd30747d2872bc813c8d2c85e
                    sub_code: INVALID_REFERENCE_ID
                    message: Invalid reference_id
        '401':
          description: Incorrect client_id or client_secret
          content:
            application/json:
              schema:
                title: Response 401 - Not Authenticated / Invalid Client Credentials
                oneOf:
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_401_UNAUTHENTICATED
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_401_INVALID_CLIENT_CREDENTIALS
              examples:
                401 - Not Authenticated:
                  summary: Authentication required
                  value:
                    detail: Not authenticated
                401 - Invalid Client Credentials:
                  summary: Invalid client credentials
                  value:
                    detail: Invalid client_id or client_secret, access Denied
        '403':
          description: Access Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_403_ACCESS_FORBIDDEN
              examples:
                403 - Invalid Token:
                  summary: Invalid or expired token
                  value:
                    detail: Not a valid token
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                title: Response 500 - Session Expired / Source Failure
                oneOf:
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_500_SESSION_EXPIRED
                  - $ref: >-
                      #/components/schemas/RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_500_SOURCE_FAILURE
              examples:
                500 - Session Expired:
                  summary: Session expired, generate a new OTP
                  value:
                    code: 502
                    timestamp: 1738332826135
                    transaction_id: bde330b8a5124b94b26d82dacdd7e6a3
                    sub_code: INVALID_SESSION
                    message: Session expired, please generate a new OTP
                500 - Source Failure:
                  summary: Authorised source unavailable
                  value:
                    code: 500
                    timestamp: 1738332826135
                    transaction_id: b718d89b03e74e6d9b33d8cce2785714
                    sub_code: SOURCE_FAILURE
                    message: >-
                      Authorised source is temporarily unavailable, please try
                      again shortly.
      security:
        - ApiKeyAuth: []
          ClientIdAuth: []
components:
  schemas:
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_200_SUCCESSFUL:
      title: eKYC Successful
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 200
        timestamp:
          title: Timestamp
          type: integer
        transaction_id:
          title: Transaction Id
          type: string
        sub_code:
          title: Sub Code
          type: string
          default: SUCCESS
        message:
          title: Message
          type: string
          default: Aadhaar eKYC Successful
        data:
          title: Data
          type: object
          properties:
            address:
              title: Address
              type: object
              properties:
                careOf:
                  title: Care Of
                  type: string
                country:
                  title: Country
                  type: string
                district:
                  title: District
                  type: string
                house:
                  title: House
                  type: string
                landmark:
                  title: Landmark
                  type: string
                locality:
                  title: Locality
                  type: string
                pin:
                  title: Pin
                  type: string
                postOffice:
                  title: Post Office
                  type: string
                state:
                  title: State
                  type: string
                street:
                  title: Street
                  type: string
                subDistrict:
                  title: Sub District
                  type: string
                vtc:
                  title: Vtc
                  type: string
            dateOfBirth:
              title: Date Of Birth
              type: string
            email:
              title: Email
              type: string
            gender:
              title: Gender
              type: string
            generatedAt:
              title: Generated At
              type: string
            maskedNumber:
              title: Masked Number
              type: string
            name:
              title: Name
              type: string
            phone:
              title: Phone
              type: string
            photo:
              title: Photo
              type: string
              format: byte
            aadhaar_linked_mobile_match:
              title: Aadhaar Linked Mobile Match
              type: string
            document_pdf:
              title: Document Pdf
              type: string
              format: byte
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_400_INVALID_SESSION:
      title: Invalid Session
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 400
        timestamp:
          title: Timestamp
          type: integer
        transaction_id:
          title: Transaction Id
          type: string
        sub_code:
          title: Sub Code
          type: string
          default: INVALID_INPUT
        message:
          title: Message
          type: string
          default: Invalid Session Id
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_400_INVALID_REFERENCE_ID:
      title: Invalid Reference Id
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 400
        timestamp:
          title: Timestamp
          type: integer
        transaction_id:
          title: Transaction Id
          type: string
        sub_code:
          title: Sub Code
          type: string
          default: INVALID_REFERENCE_ID
        message:
          title: Message
          type: string
          default: Invalid reference_id
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_401_UNAUTHENTICATED:
      title: Not Authenticated
      type: object
      properties:
        detail:
          title: Detail
          type: string
          default: Not authenticated
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_401_INVALID_CLIENT_CREDENTIALS:
      title: Invalid Client Credentials
      type: object
      properties:
        detail:
          title: Detail
          type: string
          default: Invalid client_id or client_secret, access Denied
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_403_ACCESS_FORBIDDEN:
      title: Access Forbidden
      type: object
      properties:
        detail:
          title: Detail
          type: string
          default: Not a valid token
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_500_SESSION_EXPIRED:
      title: Session Expired
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 502
        timestamp:
          title: Timestamp
          type: integer
        transaction_id:
          title: Transaction Id
          type: string
        sub_code:
          title: Sub Code
          type: string
          default: INVALID_SESSION
        message:
          title: Message
          type: string
          default: Session expired, please generate a new OTP
    RESPONSE_AADHAAR_EKYC_V2_VERIFY_OTP_500_SOURCE_FAILURE:
      title: Source Failure
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 500
        timestamp:
          title: Timestamp
          type: integer
        transaction_id:
          title: Transaction Id
          type: string
        sub_code:
          title: Sub Code
          type: string
          default: SOURCE_FAILURE
        message:
          title: Message
          type: string
          default: >-
            Authorised source is temporarily unavailable, please try again
            shortly.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        ACCESS_TOKEN generated from the authorize endpoint. Should be included
        in the header as Bearer .
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The CLIENT_SECRET provided to you. This header parameter is required for
        authentication purposes.
    ClientIdAuth:
      type: apiKey
      in: header
      name: client-id
      description: >-
        The CLIENT_ID provided to you. This header parameter is required for
        authentication purposes.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.