Welcome to Authorization Server
LMS APIs support OAuth 2.0 handshake. As a first step your application needs to be registered. you can register your application . You will be provided with a Client Id and a Client Secret.
-
Get an Access Token
The application calls the access token endpoint with the client credentials.POST /api/v1/oauth/token HTTP/1.1 Content-Type: application/x-www-form-urlencoded Accept: application/json grant_type=client_credentials&client_id=6DBD10DD-8177-4FE2&client_secret=testsecret
Schoolnet validates the supplied clientcredentials and issues access token.
{ "access_token":"gAAAAE1pb90KsS0RXvgWgj4HUZwMvk7Haun7plrl5P6VeVJ3CFxcKRmlk4FO7ddyuNb7y5vUe6S7RZ-", "token_type":"bearer", "expires_in":"86400" }
Once you have an access token, please include it in the Authorization Header before calling an API and you should be all set!
GET /api/v1/schools
Authorization: Bearer gAAAAEGDra4unS6vm8zHc1n0IgsL77vUalsnqeUUjHZfgWpuh8L8IdLlD2j_c....
Get an Access Token from a Refresh Token
The application calls the Schoolnet access token endpoint with the Refresh Token and the client credentials.
POST /api/v1/oauth/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept: application/json
refresh_token=ZyRe%21IAAAACzRNDwwk2NtLa8wfasa4V2bOH5KKDsrw&grant_type=refresh_token&client_id=c364d52aaf&client_secret=fa5c253a6e7b4f
Schoolnet validates the supplied Refresh Token and the client credentials and issues a new access token.
{
"access_token":"ZyRe%21IAAAACzRNDwwk2NtLa8wfasa4V2bOH5KKDsrw",
"token_type":"bearer",
"expires_in":"86400",
"refresh_token":"_pyI!IAAAAIlwUvCdU7QdQ7dPM_X6kXi"
}