Authentication & API Calls
JWT access tokens, your API key and Account Id, and calls for a connected account.
Secured API calls use a JWT access token. You request that token with your API key and Account Id, then send it as Authorization: Bearer.
There are two ways to call the API:
- As your own account. Request a token, then call the endpoint. See API Key and Client ID.
- As a connected account. Use the same token, and add the connected account's ID in
X-On-Behalf. See Requests on Behalf Of.
Recommendations
- Keep the API key and Account Id on your server. Do not put them in a client app, a log, or source control.
- The token lasts 15 minutes in Production and 60 minutes in Demo. There is no refresh token. Request a new one before the current one expires.
- Leave
X-On-Behalfoff when the call is for your own account. - Send
X-On-Behalfonly for a connected account that has been approved.
Updated 10 days ago
Did this page help you?