Prerequisites
You’ll need a Developer Portal account. Use the Developer Portal to create a test operator, manage API access for a connected operator account, or create a partner app. You do not need to connect a real operator account just to explore the API.Choose your connection method
Choose Operator integration for your own operator account or when you manage API access on an operator’s behalf. Choose Partner app for a product that operators authorise independently. All paths use the sameAuthorization: Bearer <token> header for API requests. They differ in how you obtain and renew the token.
- Operator integration
- Partner app
Start with Connect an account, then create credentials for that operator through the Developer Portal.
- For short-lived tasks, use an Access Token.
- For ongoing backend access, use Client Credentials.
Option A: Access token
Use an expiring Access Token for one-time scripts, API exploration, or short-lived AI-agent tasks. Choose a short expiry and only the scopes your task needs. Follow Use an Access Token to create an expiring token for your test operator or connected account. Use it directly in the bearer header of your first API request.Option B: OAuth 2.0 — Client Credentials
Use this when your backend needs ongoing access to an account you manage, without user interaction. Follow Use an OAuth Client for client creation, token exchange, authenticated requests, and renewal. OAuth access tokens expire after 2 hours. Client Credentials does not issue a refresh token. Your backend obtains a replacement access token by repeating theclient_credentials exchange.
Option C: OAuth 2.0 — Authorization Code
An operator’s staff member authorises your partner app to access their data through the flow below.Step 1: Redirect the user to authorise
Generate an unpredictable, single-usestate value with a cryptographically secure random generator. Store the value in the initiating browser session on your server, with a short expiry.
The state value binds the callback to the session that started the connection and protects against cross-site request forgery (CSRF).
Direct the user’s browser to the following URL. Replace STATE with the value you stored:
redirect_uri with an authorisation code and the same state value:
Step 2: Validate the callback
Before exchanging the code, validate the callback on your server:- Read the stored state from the browser session that initiated the connection.
- Check that the callback includes
stateand that it exactly matches the stored value. - Check that the stored state has not expired or already been used.
- Consume the stored state so another callback cannot reuse it. Make validation and consumption atomic so concurrent callbacks cannot both succeed.
Step 3: Exchange the code for tokens
Refreshing tokens
Access tokens expire after 2 hours. A request with an expired token returns401 Unauthorized with the code invalid_token. Use the refresh token to get a new one without requiring the user to re-authorise:
access_token and a new refresh_token. The previous refresh token is revoked.
PKCE (optional)
PKCE (Proof Key for Code Exchange) protects the Authorization Code flow against code interception. Use it when your OAuth client is a single-user application running on a user-owned device — a mobile app, a desktop app, or a CLI tool. Generate acode_verifier and code_challenge before redirecting:
state from Step 1 and validate the callback before exchanging the code:
code_verifier when exchanging the code: