# Get Authentication Token

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /oauth/token:
    post:
      summary: Get Authentication Token
      deprecated: false
      description: >
        To generate an authentication token, you need to send a POST request to
        our OAuth endpoint. This request will authenticate your credentials and
        return an access token, which you can use to authorize subsequent API
        requests. Ensure that your credentials are properly encoded and secure
        during this process.




        <TipInfo>Note: Encryption and Decrytion is not needed in Get
        Authentication Api</TipInfo>
      tags:
        - >-
          Account Receivable/APIs - Account Receivable /Get Authentication Token
          Copy
      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
      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: >-
        Account Receivable/APIs - Account Receivable /Get Authentication Token
        Copy
      x-apidog-status: developing
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-18880668-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: []

```
