Skip to content

Obtain a scoped machine token

POST
/v1/integration-oauth/token
curl --request POST \
--url https://api.academy.example.com/v1/integration-oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data 'scope=people:write enrollments:write'

Versioned integration contract.

Media typeapplication/x-www-form-urlencoded
object
grant_type
required
string
Allowed value: client_credentials
client_id
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
client_secret
string
<= 300 characters
scope
string
<= 500 characters

Example

grant_type=client_credentials&scope=people%3Awrite+enrollments%3Awrite

Success

Media typeapplication/json
object
access_token
required
string
token_type
required
string
Allowed value: Bearer
expires_in
required
number
Allowed value: 900
scope
required
string

Example

{
"access_token": "acm_3q2…",
"token_type": "Bearer",
"expires_in": 900,
"scope": "people:write enrollments:write"
}

Error; error and message identify the reason

Media typeapplication/json
object
error
required

Stable code, e.g. insufficient_scope, not_found, validation_failed

string
message
string

Example generated

{
"error": "example",
"message": "example"
}