Follow the Client credentials authorization flow to generate access bearer tokens for use in requests to the OneRoster OAuth 2.0 API. The Client credentials authorization flow entails services communicating 'machine-to-machine' without the direct involvement of a user.
The access bearer token authorizes all requests to our OneRoster OAuth 2.0 endpoints. Note that the OneRoster OAuth 2.0 API is an implementation of the OneRoster v1.1 specification; therefore, newer versions of the specification (i.e., v1.2) are unsupported currently.
The OneRoster API with support for the client credentials OAuth 2.0 workflow is incompatible with the Try it console found in our endpoint documentation; use the examples listed below to try out the OneRoster API.
key
secret
Requests to OneRoster 2.0 API endpoints require obtaining an access bearer token from the SKY API authorization /token
An example request to the SKY API authorization /token
POST /token HTTP/1.1 Host: https://oauth2.sky.blackbaud.com Authorization: Basic base64EncodedKey:Secret Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &scope=scopename
POST /token HTTP/1.1
Host: https://oauth2.sky.blackbaud.com
Authorization: Basic base64EncodedKey:Secret
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&scope=scopename
Encode the key
secret
/token
Use the following commands to locally encode the key
secret
Windows (Powershell):
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('key:secret'))
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('key:secret'))
Mac OS & Linux (Terminal)
echo -n 'key:secret' | base64
echo -n 'key:secret' | base64
key
secret
curl \ -X POST \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Authorization:Basic base64EncodedKey:Secret" \ -d "grant_type=client_credentials&scope=https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly" \ https://oauth2.sky.blackbaud.com/token
curl \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization:Basic base64EncodedKey:Secret" \
-d "grant_type=client_credentials&scope=https://purl.imsglobal.org/spec/or/v1p1/scope/roster-core.readonly" \
https://oauth2.sky.blackbaud.com/token
access_token
https://oauth2.sky.blackbaud.com/token
key
secret
Access token
Requests to the /token
School API currently supports the following scopes and their corresponding endpoints:
https://purl.imsglobal.org/spec/or/v1p1/scope/roster-demographics.readonly
https://purl.imsglobal.org/spec/or/v1p1/scope/roster.readonly
https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.readonly
https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.createput
https://purl.imsglobal.org/spec/or/v1p1/scope/gradebook.delete
Access tokens expire after 3600 seconds (i.e., one hour); applications must request a replacement token when the current one expires.