Calling the API with an access token
With an access token from the OAuth flow, you call the same API for the merchant’s account that a platform calls with its API key, with two differences in how you send requests. A few platform functions aren’t available with an access token: see Limitations of access tokens.
Send the token as a Bearer token:
Authorization: Bearer at_1234_h480djs93hd8Leave the instance out of the URL. The token already says which account it is for, so requests go to https://app.shuttleglobal.com/c/api/... rather than /c/api/instances/{instance_key}/...:
curl "https://app.shuttleglobal.com/c/api/transactions?limit=1" \ -H "Authorization: Bearer $ACCESS_TOKEN"Each operation in the API reference shows this form: choose OAuth in the request panel’s credentials.
Keep each merchant’s tokens separate, and never use one merchant’s token for another. When a token expires you get a 401: refresh it and retry.
Limitations of access tokens
Section titled “Limitations of access tokens”An access token is for working with the one merchant account it was issued for. The platform functions below are for the platform that owns the account, with its own API key, so they aren’t available with an access token. Requests for them get a 403 response:
- creating instances (Create an instance)
- deep links, which embed Shuttle’s components such as Merchant Setup
- the checkout monitor
- custom domains
- payment volume (TPV) reporting
- managing OAuth connections, such as removing a third party from an account
- managing API keys
Was this page helpful?
What went wrong?
Thanks for telling us.