> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify OTP

> Verify OTP to authenticate tax payer. This API will start a session and provide access valid for 6 hrs. Returns date timestamp of expiry of session.

<Warning>
  **Prerequisites:** You must enable API access to get access to GST APIs. If not done already, [enable API access](/api-reference/gst/compliance/guides/taxpayer/authentication/enable_api_access).
</Warning>


## OpenAPI

````yaml api-reference/gst/compliance/openapi.json POST /gst/compliance/tax-payer/otp/verify
openapi: 3.0.1
info:
  title: compliance
  description: >-
    **GST Compliance API** enables businesses to automate compliance
    requirements like [Taxpayer
    verification](https://developer.sandbox.co.in/reference/search-gstin-api),
    [GSTR
    Filing](https://developer.sandbox.co.in/reference/gst-taxpayer-authentication),
    [Generating
    E-Invoices](https://developer.sandbox.co.in/reference/e-invoice-authentication-api),
    and [E-Way
    Bills](https://developer.sandbox.co.in/reference/e-way-bill-authentication-api).We
    provide these APIs from GSTN-authorised GST Suvidha Providers, handling the
    encryption-decryption and signing so you don't have to handle the
    complexities.
  version: 1.0.0
servers:
  - url: https://api.sandbox.co.in
  - url: https://test-api.sandbox.co.in
security: []
tags:
  - name: Public
  - name: Taxpayer
  - name: Taxpayer Auth
  - name: Returns
  - name: GSTR-1 Documents
  - name: File GSTR-1
  - name: GSTR-2A Documents
  - name: GSTR-2B Document
  - name: File GSTR-3B
  - name: GSTR-4
  - name: File GSTR-9
  - name: Invoice Management System
  - name: GSTR-1A Documents
  - name: File GSTR-1A
  - name: Ledgers
  - name: e-Invoice
  - name: Sales e-Invoices for return period
  - name: Purchase e-Invoices for return period
  - name: Front Office Notices
  - name: Front Office
  - name: AATO
  - name: e-Invoice1
  - name: Authentication
  - name: e-Invoice12
  - name: E-Way Bill
  - name: E-Way Bill1
  - name: Authentication1
  - name: Consignor
  - name: Consolidated E-Way Bill
  - name: Multi-Vehicle Movement
  - name: Consignee
  - name: Transporter
  - name: Consolidated E-Way Bill1
  - name: Multi-vehicle Movement
  - name: Common
paths:
  /gst/compliance/tax-payer/otp/verify:
    post:
      tags:
        - Taxpayer
        - Taxpayer Auth
      summary: Verify OTP
      description: >-
        Verify OTP to authenticate tax payer. This API will start a session and
        provide access valid for 6 hrs. Returns date timestamp of expiry of
        session.
      operationId: verifyOtp
      parameters:
        - name: otp
          in: query
          description: One time password
          required: true
          example: 575757
          schema:
            type: integer
            format: int32
            example: '575757'
        - name: authorization
          in: header
          description: JWT access token
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-source
          in: header
          description: 'Source. Possible Values: primary (default) or secondary'
          required: false
          example: primary
          schema:
            type: string
            default: primary
            example: primary
        - name: x-api-key
          in: header
          description: API key for identification
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-api-version
          in: header
          description: API version
          required: false
          example: ''
          schema:
            type: string
            default: 1.0.0
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - gstin
              properties:
                username:
                  type: string
                  description: Username as per GST portal
                gstin:
                  type: string
                  description: GSTIN of the taxpayer
            examples:
              200 Success:
                value:
                  username: TN_NT2.2477
                  gstin: 33ABKCS2033B1ZW
                summary: 200 Success
              AUTH4033 Invalid session:
                value:
                  username: globex.edu.co
                  gstin: 23ABCCQ2000E000
                summary: AUTH4033 Invalid session
      responses:
        '200':
          description: AUTH4033 Invalid session / 200 Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 200
                  data:
                    type: object
                    properties:
                      access_token:
                        type: string
                        example: >-
                          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0YXhwYXllci1zZXNzaW9uIiwiZ3N0aW4iOiIyNEFCS0NTMjAzM0IxWlYiLCJpYXQiOjE3MTI5NDQxMDAsImV4cCI6MTcxMjk0NzcxMX0.sandbox-signature
                      error:
                        type: object
                        properties:
                          error_cd:
                            type: string
                            example: AUTH4033
                          message:
                            type: string
                            example: Invalid Session
                      session_expiry:
                        type: number
                        example: 1712947711000
                      status_cd:
                        type: string
                        example: '0'
                      token_expiry:
                        type: number
                        example: 1712947711000
                  timestamp:
                    type: number
                    example: 1763446641000
                  transaction_id:
                    type: string
                    example: 1ad1d698-499e-4b10-a44a-fecba43babbb
              examples:
                200 Success:
                  summary: 200 Success
                  value:
                    code: 200
                    data:
                      access_token: >-
                        eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0YXhwYXllci1zZXNzaW9uIiwiZ3N0aW4iOiIyNEFCS0NTMjAzM0IxWlYiLCJpYXQiOjE3MTI5NDQxMDAsImV4cCI6MTcxMjk0NzcxMX0.sandbox-signature
                      session_expiry: 1712947711000
                      status_cd: '1'
                      token_expiry: 1712947711000
                    timestamp: 1712926110000
                    transaction_id: f6a85bd7-6d53-4e60-b4a7-480d3738ff0c
                AUTH4033 Invalid session:
                  summary: AUTH4033 Invalid session
                  value:
                    code: 200
                    data:
                      error:
                        error_cd: AUTH4033
                        message: Invalid Session
                      status_cd: '0'
                    timestamp: 1763446641000
                    transaction_id: 1ad1d698-499e-4b10-a44a-fecba43babbb
          headers: {}
        '500':
          description: Invalid GSTIN pattern
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 422
                  message:
                    type: string
                    example: Invalid GSTIN pattern
                  timestamp:
                    type: number
                    example: 1763446641000
                  transaction_id:
                    type: string
                    example: 21c38e93-b4df-4266-84ca-28885be68d1e
              examples:
                Invalid GSTIN pattern:
                  summary: Invalid GSTIN pattern
                  value:
                    code: 422
                    message: Invalid GSTIN pattern
                    timestamp: 1763446641000
                    transaction_id: 21c38e93-b4df-4266-84ca-28885be68d1e
          headers: {}
      deprecated: false
      security: []

````