Welcome to the OAuth server
Getting started
To use this OAuth server, please contact us to request an OAuth application.
Please provide a short description of the application you are creating, along with the details below. No worries if you are unsure - we can use the description you provide to help.
- The client type: public or confidential?
- The grant type: authorization, client-credentials or device?
- The allowed redirect URIs.
- The resources you would like to access. Please explore our API documentation, and our GraphQL API.
Example (authorization)
3. Exchange authorization code for access token
POST /token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI&client_id=YOUR_CLIENT_ID&code_verifier=YOUR_CODE_VERIFIER
Example (client credentials)
1. Exchange credentials for an access token
POST /token
Authorization: Basic BASE64_ENCODED(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
2. Access protected resource
GET /resource
Authorization: YOUR_ACCESS_TOKEN
Example (device)
2. Authenticate device
After performing the /device-authorization
request, the device should attempt to acquire an access token every few seconds (at a rate specified by interval
in seconds) by performing the following request while the user is authorizing the device.
POST /token
Content-Type: application/x-www-form-urlencoded
client_id=YOUR_CLIENT_ID&device_code=DEVICE_CODE&grant_type=urn:ietf:params:oauth:grant-type:device_code
That request will return error messages until the user authorizes the device or the device session expires. The success response will look like this one where the access_token
is returned:
{
"access_token": YOUR_ACCESS_TOKEN,
"expires_in": 3600,
"token_type": "Bearer",
"scope": "openid full-customer-access",
"refresh_token": YOUR_REFRESH_TOKEN
}