> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincode.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Token

> Authenticate and generate an access token for API requests.



## OpenAPI

````yaml POST /oauth/token
openapi: 3.0.0
info:
  title: FinCode API
  version: v6
servers:
  - url: https://{tenant}.fincode.software/api/v6/services
    description: API v6
    variables:
      tenant:
        default: remitjunction
        description: Enter your tenant subdomain
  - url: https://{tenant}.fincode.software/api/v1/services
    description: API v1
    variables:
      tenant:
        default: finlend
        description: Enter your tenant subdomain
  - url: https://api.stag.songhaiexchange.io
    description: Songhai Exchange API
security: []
paths:
  /oauth/token:
    post:
      tags:
        - Authentication
      summary: Generate Token
      description: Authenticate and generate an access token for API requests.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - username
                - password
                - grant_type
              properties:
                username:
                  type: string
                  description: Your username
                password:
                  type: string
                  description: Your password
                grant_type:
                  type: string
                  enum:
                    - password
                  default: password
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - SUCCESS
                      - ERROR
                  message:
                    type: string
                  errorCode:
                    type: integer
                  data:
                    type: object
                    properties:
                      accountNumber:
                        type: string
                      accountName:
                        type: string
                      accountCurrency:
                        type: string
                      receiverMobileNumber:
                        type: string
                        nullable: true
      security:
        - basicAuth: []
      servers:
        - url: https://api.stag.songhaiexchange.io
components: {}

````