> ## 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

> Authenticates with your clientId, clientSecret, and accountId, then returns a Bearer access token valid for 30 minutes for use on all protected API endpoints.

**Learn more:**

* How to authenticate with Chift? [↗](/guides/chift-authentication)
* How does Chift work? [↗](/guides/how-it-works)
* How to use the Chift SDKs? [↗](/guides/sdks)


## 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: >-
        Authenticates with your clientId, clientSecret, and accountId, then
        returns a Bearer access token valid for 30 minutes for use on all
        protected API endpoints.
      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.

````