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 — identifies the integration inside a single brand
- Client Secret — the secret paired with that Client ID
- Brand — the brand identifier of the Clopos customer you are integrating with
- Integrator ID — identifies you, the integrator. New in v2 and required on every auth call.
Where the Integrator ID comes from
Request anintegrator_id from Clopos by filling out this form. You need one integrator_id for your integration as a whole, and you reuse it across every brand you connect to.
Where the Client ID and Client Secret come from
The Client ID and Client Secret are not issued by Clopos. They are generated by the Clopos customer (the brand owner) inside their own back office, in the Open API module, and then shared with you along with theirbrand identifier.
If you are the integrator, send the steps below to your customer. Only someone with back office access to the brand can create these credentials.
1
Open the Open API module
Sign in to the Clopos back office and go to Add-ons → Open API. This requires an account with the add-ons management permission.If the module is not listed, it has not been enabled for the brand yet — subscribe to it from the add-ons list, or contact dev@clopos.com.
2
Create the credentials
Click Create credentials. Clopos generates the Client ID and Client Secret and displays them on the page, each with a copy button.
3
Choose the staff user
Select a Staff member in the dropdown that appears. Every API request made with these credentials acts on behalf of that user, so their role and permissions determine what your integration is allowed to do. Pick a user whose permissions match the scope of the integration.
4
Enable and save
Turn the status toggle on and save. Authentication fails with
Client is disabled while the module is switched off, and the form will not save until credentials have been generated.5
Share the values with your integrator
Copy the Client ID and Client Secret and send them to your integrator, together with your brand identifier — the short brand slug used for your Clopos account, such as
openapitest.Create credentials only appears while both fields are empty. Once generated, the values stay visible on the module page so they can be copied again at any time, but they cannot be regenerated from the back office. Contact dev@clopos.com if a secret needs to be rotated.
All v2 requests use the base URL
https://integrations.clopos.com/open-api/v2.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.