> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.fidly.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Token



## OpenAPI

````yaml /openapi.json post /auth/token
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /auth/token:
    post:
      tags:
        - auth
      summary: Token
      operationId: token_auth_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TokenRequest:
      properties:
        grant_type:
          type: string
          enum:
            - client_credentials
            - refresh_token
          title: Grant Type
        client_id:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Client Id
        client_secret:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Client Secret
        refresh_token:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Refresh Token
      type: object
      required:
        - grant_type
      title: TokenRequest
      description: >-
        The three credentials are bounded because this route is
        pre-authentication and

        `client_id` becomes a key of the throttle's dictionary, held for the
        whole 15-minute

        window: without a bound, an anonymous caller decides how many bytes each
        of the

        `_MAX_TRACKED` entries weighs. The widths are the columns' (`CLIENT_ID`
        is a

        `VARCHAR(64)`), so nothing that could match is refused.
    TokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        expires_in:
          type: integer
          title: Expires In
        refresh_token:
          type: string
          title: Refresh Token
      type: object
      required:
        - access_token
        - expires_in
        - refresh_token
      title: TokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````