Authorization
The Trading API uses OAuth 2.0 with the client credentials grant. You get a client_id and client_secret for your bookmaker (see Getting credentials), exchange them for a short-lived Bearer access token at the token endpoint, then send that token in every API request.
Migrating from X.509 certificates
The Trading API previously required a mutual-TLS (mTLS) X.509 client certificate. It has since migrated to OAuth 2.0. Certificate-based access still works, so existing integrations keep functioning, but it is deprecated — new integrations should use OAuth 2.0, and existing ones should migrate when convenient. See Legacy: mTLS authentication below.
Hosts
The token endpoint is served on the API host — integration: api.int.databet.cloud, production: api.databet.cloud.
The API itself is split across hosts by product: the Odds Feed on feed.int.databet.cloud / feed.databet.cloud, Managed Trading Services on mts.int.databet.cloud / mts.databet.cloud, and the remaining endpoints on the api.* host.
1. Request an access token
1 2 3 | |
1 2 3 4 5 | |
1 2 3 4 | |
The token endpoint accepts an application/x-www-form-urlencoded body (not JSON). Send the credentials either via HTTP Basic authentication (recommended) or as client_id and client_secret form fields. Use one method, not both.
2. Call the API with the token
Send the token in the Authorization header on every request. It replaces the client certificate — no --cert / --key is needed.
1 2 | |
1 2 3 4 | |
Access tokens are short-lived (see expires_in, in seconds). When a token expires, request a new one — the client credentials grant has no refresh token. A common approach is to cache the token in memory and re-mint it shortly before it expires, or on the first 401.
3. Send requests from the docs
You can send requests to the API from any Trading API page. Click Authorize and enter your client_id and client_secret. The docs request an access token for you.
You can also request a token directly below.
Getting credentials
A client_id and client_secret pair belongs to an OAuth client. There are two ways to get one:
-
Sport Trading Management — generate an OAuth client yourself:
- Go to Settings → OAuth clients.
- Click Generate new.
- Enter a label for the OAuth client, for example the name of the integration, and click Generate.
- Copy the Client ID and Secret from the dialog, then click Close.
The dialog also shows a ready
curlcommand that requests an access token with the new credentials. See OAuth clients for details. -
DATA.BET integration team — ask your integration manager to generate an OAuth client for you.
Copy the secret now — it is shown only once
The secret is shown only in the dialog right after you generate the OAuth client. You cannot see it again. Copy it and store it securely. If you lose it, generate a new OAuth client and revoke the old one.
Rotating and revoking
A bookmaker can have several active OAuth clients, so you can rotate credentials without downtime:
- Generate a new OAuth client.
- Switch your integration to the new
client_idandclient_secret. - When all traffic uses the new OAuth client, click Revoke on the old one.
A revoked OAuth client cannot request new tokens. A token already issued to it, however, keeps working until it expires (see expires_in, up to 1 hour) — the gateway verifies tokens locally against the current signing key and does not check revocation status on every request. If you need a token to stop working immediately, treat it as compromised and contact the DATA.BET integration team.
Legacy: mTLS authentication (deprecated)
Deprecated
mTLS with an X.509 client certificate is the previous authentication method. It is still accepted so existing integrations are not broken, but it is deprecated — prefer OAuth 2.0 (above) for new work. With mTLS you present client.crt / client.key on the TLS connection and call the API directly — no access token is involved.
After registering, get in touch with the Trading platform's admin to receive the X.509 certificate. client.crt and client.key are provided by the DATA.BET integration team.
Check that the certificate works
To check the certificate, request the version of the latest patch/log via curl.
Get the latest version via curl
1 2 3 4 5 | |
1 2 3 4 5 6 7 8 9 | |