# Generate Authentication Token

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /oauth/token:
    post:
      summary: Generate Authentication Token
      deprecated: false
      description: >+


        :::highlight purple 📌

        To obtain an authentication token, send a POST request to our OAuth
        endpoint. This request authenticates your credentials and returns an
        access token, which you will use to authorize all subsequent API calls.

        :::


        <TipInfo>Make sure your credentials are properly encoded and transmitted
        securely</TipInfo>

        <TipInfo>Encryption and decryption are not required when using the Get
        Authentication API</TipInfo>

      tags:
        - Payouts/APIs - Payout/Encryption & Decryption Guide
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/x-www-form-urlencoded
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Basic Authorization token generated using Base64 encoding
            {clientId}:{clientSecret}
          required: true
          example: Basic ZW5rYXNoLWNsaWVudDplbmthc2gtc2VjcmV0
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                username:
                  description: Registered Email Id
                  example: saquib.n+ins@enkash.com
                  type: string
                password:
                  description: Password for the user
                  example: Password@123
                  type: string
                grant_type:
                  type: string
                  default: password
                  example: password
                clientId:
                  description: 'Client Id '
                  example: CEKFOWV7UQ
                  type: string
              required:
                - username
                - password
                - grant_type
                - clientId
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                  tokenType:
                    type: string
                  expiresIn:
                    type: integer
                    format: int32
                  refreshToken:
                    type: string
                x-apidog-orders:
                  - 01J05FADB98VP8XVQS35RHBM3K
                x-apidog-refs:
                  01J05FADB98VP8XVQS35RHBM3K:
                    $ref: '#/components/schemas/OauthTokenResponse'
                x-apidog-ignore-properties:
                  - accessToken
                  - tokenType
                  - expiresIn
                  - refreshToken
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Payouts/APIs - Payout/Encryption & Decryption Guide
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-8990264-run
components:
  schemas:
    OauthTokenResponse:
      type: object
      properties:
        accessToken:
          type: string
        tokenType:
          type: string
        expiresIn:
          type: integer
          format: int32
        refreshToken:
          type: string
      x-apidog-orders:
        - accessToken
        - tokenType
        - expiresIn
        - refreshToken
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
