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

# Get access token

> This endpoint allows you to get an access token that can be used as a BEARER token to access the protected endpoints of this APIs. The token is valid for 30 minutes. You can refresh the token by requesting a new token.



## OpenAPI

````yaml post /token
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /token:
    post:
      tags:
        - General
      summary: Get access token
      description: >-
        This endpoint allows you to get an access token that can be used as a
        BEARER token to access the protected endpoints of this APIs. The token
        is valid for 30 minutes. You can refresh the token by requesting a new
        token.
      operationId: generate_access_token_token_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthItem'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security: []
components:
  schemas:
    AuthItem:
      properties:
        clientId:
          type: string
          title: Clientid
        clientSecret:
          type: string
          title: Clientsecret
        accountId:
          type: string
          format: uuid
          title: Accountid
        marketplaceId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Marketplaceid
      type: object
      required:
        - clientId
        - clientSecret
        - accountId
      title: AuthItem
    Token:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
        expires_in:
          type: integer
          title: Expires In
        expires_on:
          type: integer
          title: Expires On
      type: object
      required:
        - access_token
        - token_type
        - expires_in
        - expires_on
      title: Token
    HTTPValidationError:
      title: Validation Error
      required:
        - message
      type: object
      properties:
        message:
          title: Message
          type: string
          default: Validation error
        status:
          title: Status
          type: string
          default: error
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````