Product: Partner Portal
Audience: Partner Administrator, Partner Developer
Exchanging response code for access token
Once you receive a a code from the initial request, you must now exchange the code for an access token which is used in REST API calls.
The response code can be found in the redirect_uri
You will do a POST request to the token endpoint https://launchpad.classlink.com/oauth2/v2/token with the code, client_secret and client_id in the post body.
The client_secret and client_id are assigned to your application in the ClassLink Dev Console.
There are several great REST API clients you can use for testing. For Chrome, the Advanced Rest Client is easy to use.
Firefox has an add-on called REST Client. The RESTClient for Firefox can automatically exchange and embed the token in your REST API calls.
The token endpoint will verify your client_id, client_secret, code and then respond with your access_token. The id_token encodes the user information and this will be used in the next step.
Now you are ready to access the APIs!
Updated: November 2020