v7

latestOpenAPI 3.0.02026-08-046241,3352.0 MB
External

External API token (client credentials)

Auth: Anonymous - no token required.

OAuth2 client-credentials grant for external API clients (OneRoster auth format).

Request

The body must be form-encoded:

  • Content-Type: application/x-www-form-urlencoded (multipart/form-data is also accepted)
  • grant_type=client_credentialsrequired; any other value returns 400 unsupported_grant_type

Supply credentials one of two ways:

MethodHow
HTTP Basic authAuthorization: Basic base64(client_id:client_secret)
Form fieldsclient_id and client_secret in the body

⚠️ Credentials must not be placed in the query string — secrets in URLs leak through proxy/server logs, browser history and referrers. A client_id/client_secret query parameter is rejected with 400 invalid_request.

Example

curl -X POST "{baseUrl}/external/v1/token" \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials"

Response

On success returns a short-lived bearer token carrying the client's configured permissions and allowed endpoints. There is no refresh token — re-request when it expires.

{
  "access_token": "<jwt>",
  "token_type": "Bearer",
  "expires_in": 3600
}

Call the API with Authorization: Bearer <access_token>.

Errors

StatusMeaning
400 invalid_requestMalformed request, or credentials in the query string
400 unsupported_grant_typegrant_type is not client_credentials
401 invalid_clientUnknown or missing credentials
403 access_deniedThe client is disabled
post/external/v1/token

Response

Success - access token issued

access_tokenstring nullable
token_typestring
expires_ininteger