Skip to main content

Authentication

The Clopos Open API v2 uses short-lived JWT access tokens. Exchange your credentials at /v2/auth to receive a token, then include it in the x-token header on every subsequent request.

Prerequisites

Before you can authenticate you will need:
  • Client ID — your application’s unique identifier
  • Client Secret — your application’s secret key
  • Brand — the brand identifier you want to access
  • Integrator ID — identifies the integrator making the request. New in v2 and required on every auth call.
Request your credentials and an integrator_id from Clopos by filling out this form.
All v2 requests use the base URL https://integrations.clopos.com/open-api/v2.

Authentication flow

Step 1: Obtain an access token

Send a POST request to the v2 auth endpoint:
Request body
venue_id is not part of the v2 auth body. The active venue is resolved from the JWT and can optionally be overridden per-request with the x-venue header.

Step 2: Inspect the response

A successful authentication returns a signed JWT:
The JWT encodes your brand, venue_id, integrator_id, and upstream auth state, so you do not need to send them as separate headers.

Step 3: Call an authenticated endpoint

Include the JWT in the x-token header. That is the only header required on v2 endpoints.
Required header
  • x-token — the JWT returned by /v2/auth.
Optional header
  • x-venue — override the venue encoded in the JWT for this request. Useful when a single integrator operates across multiple venues.

Token management

Tokens expire after expires_in seconds (typically 1 hour). Refresh them before they expire to avoid request failures.

Best practices

  1. Store tokens securely — never expose them in client-side code or commit them to source control.
  2. Refresh proactively — re-authenticate before expires_at rather than waiting for a 401.
  3. Handle errors gracefully — on any 401, re-authenticate and retry once.
  4. Use HTTPS only — never send credentials over unencrypted connections.

Error handling

Errors from /v2/auth

Errors from authenticated endpoints

Code examples

Next steps

Once you have your access token you can start making API requests: