# Auth Token

## OpenAPI Specification

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

        :::highlight purple 📌

        This endpoint is used to obtain an OAuth 2.0 access token from the
        Enkash authentication service. You must call this endpoint to validate
        their credentials and retrieve an access token, which is then required
        for all subsequent API requests.


        The generated token should be included in the Authorization header (as a
        Bearer token) when accessing any protected Enkash APIs.

        :::
      tags:
        - Wallet/APIs - Wallet/Authentication
      parameters:
        - name: Cookie
          in: header
          description: ''
          required: true
          example: >-
            _cfuvid=f5yil.adja6WY54i74vh4ra.7UO0u2fMcW3Sd7nDXbM-1737528925925-0.0.1.1-604800000;
            JSESSIONID=3811B357B64F1FB6E0C97811B55F13AA;
            _cfuvid=w0XP61XaIRNwrQKB6k8gpRdZPaCGnEwn8Gh8Lq9YcLs-1752583721627-0.0.1.1-604800000
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/x-www-form-urlencoded
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          example: ••••••
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                username:
                  description: 'The user''s username '
                  example: '6001020030'
                  type: string
                password:
                  description: 'The user''s password '
                  example: Enkash@1234567
                  type: string
                grant_type:
                  description: >-
                    The type of grant being requested (e.g., password,
                    client_credentials).
                  example: password
                  type: string
                clientId:
                  description: The unique identifier for the client application
                  example: CEKQ08TRRG
                  type: string
              required:
                - username
                - password
                - grant_type
                - clientId
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: >-
                      An access token that can be used for authenticating
                      subsequent requests.
                  token_type:
                    type: string
                    description: Token type (e.g., Bearer)
                  refresh_token:
                    type: string
                    description: refresh token
                  expires_in:
                    type: integer
                    description: Expiration time for the token.
                  scope:
                    type: string
                    description: read write trust
                required:
                  - access_token
                  - token_type
                  - refresh_token
                  - expires_in
                  - scope
                x-apidog-orders: []
              examples:
                '1':
                  summary: Success
                  value:
                    access_token: bg-xFpMtGNl2jJGD8VPR4YZpNcA
                    token_type: bearer
                    refresh_token: PAADpFl7dsgQBE-21fSSccCMlVE
                    expires_in: 86399
                    scope: read write trust
                '2':
                  summary: Example 1
                  value:
                    access_token: OYB1O3XpYBbHGjzCxGD8RszqVqg
                    token_type: bearer
                    refresh_token: zsGVMp_XCAImtz-InrJIIuo0JQg
                    expires_in: 86399
                    scope: read write trust
          headers: {}
          x-apidog-name: OK
      security:
        - basic: []
      x-apidog-folder: Wallet/APIs - Wallet/Authentication
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-19199701-run
components:
  schemas: {}
  securitySchemes:
    basic:
      type: http
      scheme: basic
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
