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.Authentication flow
Step 1: Obtain an access token
Send aPOST request to the v2 auth endpoint:
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 thex-token header. That is the only header required on v2 endpoints.
x-token— the JWT returned by/v2/auth.
x-venue— override the venue encoded in the JWT for this request. Useful when a single integrator operates across multiple venues.
Token management
Best practices
- Store tokens securely — never expose them in client-side code or commit them to source control.
- Refresh proactively — re-authenticate before
expires_atrather than waiting for a401. - Handle errors gracefully — on any
401, re-authenticate and retry once. - Use HTTPS only — never send credentials over unencrypted connections.