# Generate Authorization Token

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/merchant/token:
    post:
      summary: Generate Authorization Token
      deprecated: false
      description: >

        :::highlight purple 📌

        This API generates an authentication token that must be included in the
        headers of all subsequent API requests. The token authenticates the
        client and ensures that only authorized users can interact with the
        server, providing a secure communication channel.

        :::
      operationId: Get_Authorization_token
      tags:
        - Payment Gateway/APIs - Payment Gateway /Authorization
        - token-api-controller
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenGetRequest'
            example:
              secretKey: 0be69636edcc31fc3a7c0d189ddaf99baee2df17043ab13e8e37
              accessKey: Vl83xTM1298
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
              example:
                token: obnlw-824206346745059CiLdi
                expiry: 1767770228192
                resultCode: 0
                resultMessage: Success
          headers: {}
          x-apidog-name: OK
        x-200:Failed:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  resultCode:
                    type: integer
                    description: >-
                      Application-level error code representing the business
                      outcome of the API request.
                    x-apidog-mock: '111'
                  resultMessage:
                    type: string
                    description: >-
                      Human-readable message describing the outcome of the
                      request.
                    x-apidog-mock: Access Key is invalid
                required:
                  - resultCode
                  - resultMessage
                x-apidog-orders:
                  - resultCode
                  - resultMessage
                x-apidog-ignore-properties: []
              example:
                resultCode: 111
                resultMessage: Access Key is invalid.
          headers: {}
          x-apidog-name: Failed
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /Authorization
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-17348486-run
components:
  schemas:
    TokenGetRequest:
      required:
        - accessKey
        - secretKey
      type: object
      properties:
        accessKey:
          type: string
          description: The access key generated for your account.
        secretKey:
          type: string
          description: The secret key generated for your account.
      x-apidog-orders:
        - accessKey
        - secretKey
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    TokenResponse:
      type: object
      properties:
        token:
          type: string
          description: The generated authentication token.
        expiry:
          type: integer
          format: int64
          description: The expiration time of the token (in milliseconds since UNIX epoch).
        resultCode:
          type: integer
          format: int32
          description: >-
            The result code indicating the status of the token generation
            request.
        resultMessage:
          type: string
          description: >-
            A message providing additional information about the result of the
            token generation request.
      x-apidog-orders:
        - token
        - expiry
        - resultCode
        - resultMessage
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
