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

# Auth



## OpenAPI

````yaml POST /api/v1/auth/token
openapi: 3.0.0
info:
  title: Gatekeeper docs
  description: gatekeeper API
  version: 0.0.1
  contact: {}
servers: []
security: []
tags: []
externalDocs:
  description: JSON document
  url: /api/docs-json
paths:
  /api/v1/auth/token:
    post:
      tags:
        - Auth
      summary: Create an access token
      operationId: AuthController_token_v1
      parameters:
        - name: Authorization
          in: header
          description: >-
            Basic authorization header with client credentials in the format
            'Basic <base64-encoded string of format clientId:clientSecret>'
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateTokenInputDto'
      responses:
        '200':
          description: Returns the access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenOutputDto'
        '400':
          description: The request is not formatted correctly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthErrorOutputDto'
        '503':
          description: The OAuth service is currently unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthErrorOutputDto'
              example:
                error: server_error
                error_description: The authorization server is currently unavailable
      x-codeSamples:
        - lang: cURL
          source: >-
            curl --location --request POST
            "https://api.kashimi.tech/api/v1/auth/token"

            --header "Content-Type: application/x-www-form-urlencoded"

            --header "Accept: application/json"

            --header "Authorization: Basic BASE64_CLIENT_CREDENTIALS"

            --data-urlencode "grant_type=client_credentials"

            --data-urlencode "scope=payments:read payments:write providers:read"
components:
  schemas:
    CreateTokenInputDto:
      type: object
      properties:
        grant_type:
          type: string
          description: The type of grant being requested.
          example: client_credentials
          enum:
            - client_credentials
        scope:
          type: string
          description: Scopes being requested. Must be a space-separated list of scopes.
          example: payments:read payments:write providers:read
      required:
        - grant_type
        - scope
    CreateTokenOutputDto:
      type: object
      properties:
        access_token:
          type: string
          description: The JWT access token.
          example: YOUR_ACCESS_TOKEN
        token_type:
          type: string
          description: Token type.
          example: Bearer
        expires_in:
          type: number
          description: Expiration time of the token in seconds.
          example: 1800
      required:
        - access_token
        - token_type
        - expires_in
    OauthErrorOutputDto:
      type: object
      properties:
        error:
          type: string
          description: Error code representing the type of error.
          example: invalid_request
        error_description:
          type: string
          description: Detailed message describing the error.
          example: 'Missing parameter: `client_secret`'
      required:
        - error
        - error_description

````