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

# Generate access token

> Exchange client credentials for a short-lived JWT token used in the `x-token` header.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /auth
openapi: 3.1.0
info:
  title: Clopos Open API v2
  description: >-
    The **Clopos Open API v2** provides secure and unified access to the Clopos
    ecosystem, enabling seamless integration of POS, ordering, payments, and
    restaurant management services.
  contact:
    email: dev@clopos.com
  version: 2.0.0
  license:
    name: ''
servers:
  - url: https://integrations.clopos.com/open-api/v2
    description: '**Base Url**'
security:
  - xToken: []
tags:
  - name: Authentication
  - name: Venues
  - name: Users
  - name: Customers
  - name: Menu
  - name: Stations
  - name: Products
  - name: Price Lists
  - name: Sales
  - name: Orders
  - name: Receipts
paths:
  /auth:
    post:
      tags:
        - Authentication
      summary: Generate access token
      description: >-
        Exchange client credentials for a short-lived JWT token used in the
        `x-token` header.
      operationId: authV2
      requestBody:
        description: API credentials
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRequest'
      responses:
        '200':
          description: Token generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponse'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    AuthRequest:
      type: object
      required:
        - client_id
        - client_secret
        - brand
        - integrator_id
      properties:
        client_id:
          type: string
          description: Your client ID issued by Clopos
          example: your_client_id_here
        client_secret:
          type: string
          description: Secret paired with the client
          example: your_client_secret_here
        brand:
          type: string
          description: Brand identifier
          example: your_brand
        integrator_id:
          type: string
          description: >-
            Integrator ID. New in v2 — identifies the integrator making the
            request. Request one via https://forms.gle/Y9P1Wnv4QFAruxny8
          example: your_integrator_id_here
      example:
        client_id: your_client_id_here
        client_secret: your_client_secret_here
        brand: your_brand
        integrator_id: your_integrator_id_here
    AuthResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        token:
          type: string
          description: JWT access token for API requests
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        token_type:
          type: string
          description: Token type
          example: Bearer
        expires_in:
          type: integer
          description: Token expiration time in seconds
          example: 3600
        expires_at:
          type: integer
          description: Unix timestamp when the token becomes invalid
          example: 1767852332
        message:
          type: string
          example: Authentication successful
      example:
        success: true
        token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        token_type: Bearer
        expires_in: 3600
        expires_at: 1767852332
        message: Authentication successful
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
  securitySchemes:
    xToken:
      type: apiKey
      in: header
      name: x-token
      description: JWT access token obtained from /v2/auth endpoint

````