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

# Create token

> Endpoint used for creating of token



## OpenAPI

````yaml /public/tinapiv8.yaml post /oauth/token
openapi: 3.0.0
info:
  version: 2.4.2
  title: TINAPI
servers: []
security:
  - apiKeyAuth: []
  - apiTokenAuth: []
tags:
  - name: Action
    description: Endpoint related to actions (transactions) in TIN platform
  - name: Transfer
    description: Endpoint related to transfers in TIN platform
  - name: Token
    description: Endpoint related to token in TIN platform
paths:
  /oauth/token:
    post:
      tags:
        - Token
      summary: Create token
      description: Endpoint used for creating of token
      operationId: createToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
        required: false
      responses:
        '200':
          description: Token created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenResponse'
        '400':
          description: Token error message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - {}
        - basicAuth: []
components:
  schemas:
    CreateTokenRequest:
      type: object
      properties:
        client_id:
          type: string
        client_secret:
          type: string
    CreateTokenResponse:
      type: object
      properties:
        access_token:
          type: string
        expires_in:
          type: string
        token_type:
          type: string
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/GenericError'
    GenericError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        details:
          type: object
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    apiTokenAuth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            create_user_credentials: Grants access to create credentials for user
            create_domain_credentials: Grants access to create credentials for domain
            create_organization_credentials: Grants access to create credentials for bank
            create_all_credentials: Grants access to create credentials for all
            read_user_credentials: Grants access to read user credentials
            read_domain_credentials: Grants access to read domain credentials
            read_organization_credentials: Grants access to read bank credentials
            read_all_credentials: Grants access to read all credentials
            update_user_credentials: Grants access to update user credentials
            update_domain_credentials: Grants access to update domain credentials
            update_organization_credentials: Grants access to update bank credentials
            update_all_credentials: Grants access to update all credentials
            manage_user_credentials: Grants access to manage user credentials
            manage_domain_credentials: Grants access to manage domain credentials
            manage_organization_credentials: Grants access to manage bank credentials
            manage_all_credentials: Grants access to manage all credentials
    basicAuth:
      type: http
      scheme: basic

````