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

# Authenticate (v2)

> Exchange client credentials for a JWT access token

## Purpose

Request a short-lived JWT that authorizes all other v2 API calls.

## HTTP Request

```http theme={null}
POST https://integrations.clopos.com/open-api/v2/auth
```

## Integrator ID

<Callout type="info">
  Every v2 integration must include an `integrator_id` in the authentication request. Request one from Clopos by filling out this form: [https://forms.gle/Y9P1Wnv4QFAruxny8](https://forms.gle/Y9P1Wnv4QFAruxny8)
</Callout>

## Request Example

<CodeGroup>
  ```bash curl theme={null}
  curl --location 'https://integrations.clopos.com/open-api/v2/auth' \
    --header 'Content-Type: application/json' \
    --data '{
      "client_id": "your_client_id_here",
      "client_secret": "your_client_secret_here",
      "brand": "your_brand",
      "integrator_id": "your_integrator_id_here"
    }'
  ```
</CodeGroup>

### Request body

| Field           | Type   | Required | Description                                              |
| --------------- | ------ | -------- | -------------------------------------------------------- |
| `client_id`     | string | Yes      | Issued by Clopos.                                        |
| `client_secret` | string | Yes      | Secret paired with the client.                           |
| `brand`         | string | Yes      | Brand identifier.                                        |
| `integrator_id` | string | Yes      | New in v2. Identifies the integrator making the request. |

`venue_id` is no longer part of the authentication payload.

## Response

### 200 OK — Token issued

```json theme={null}
{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6Im9hdXRoX1lOellQZE1QV21KeU0zOFVyblQzR3hoS25TelBNTHl2clB2UGgxQnRaeVFScTVzRWJsRkl5b3MwYVIyejMwWmYiLCJicmFuZCI6Im9tZWdhIiwic3RhZ2UiOiJiZXRhIiwidmVudWVfaWQiOjEsImludGVncmF0b3JfaWQiOiJ0ZXN0X2pLc1U5NnJxMzMzYjZQb3RUWmZrZ3ciLCJpYXQiOjE3Njc4NDg3MzIsImV4cCI6MTc2Nzg1MjMzMn0.7atyo3LEPXTyIjs2BjZIcUbWeFYtr375GeDwoVnWSRs",
  "token_type": "Bearer",
  "expires_in": 3600,
  "expires_at": 1767852332,
  "message": "Authentication successful"
}
```

### How to use the token

* Include only the `x-token` header on all other v2 endpoints:
  ```bash theme={null}
  x-token: <your JWT here>
  ```
* Tokens expire after `expires_in` seconds; `expires_at` indicates the epoch timestamp when the token becomes invalid.

## Integrator ID

Some integrations need to access Clopos Open API without an end-user logging in. For these cases, an **Integrator ID** is required.

<Callout type="info">
  Request an Integrator ID by filling out this form: [Request Integrator ID](https://forms.gle/Y9P1Wnv4QFAruxny8)
</Callout>
