Requesting Access

Requesting Authorization for Access##

After you have created your application, you can now request the user for permission to access data using OAuth2.

Your application should redirect users to the ClassLink Authorization endpoint.

https://launchpad.classlink.com/oauth2/v2/auth

As part of the request, you will include several required parameters and an optional parameter outlined below.

Parameter Name

Description

Required

scope

The data you are requesting access to. Available scope options are: "email", "profile","oneroster", "full"

Required

client_id

The client_id is a string obtained from the ClassLink Developer Console.

Required

redirect_uri

Determines where the response is sent, it must match the redirect_uri assigned to your application in the Developer Console.

Required

response_type

Use code for a Basic flow.

Required

state

The state parameter is an opaque value we will return to you in the response that should match the value sent to us.

Optional, but strongly recommended

Below is a sample request.

https://launchpad.classlink.com/oauth2/v2/auth?scope=profile&redirect_uri=http%3A%2F%2Fclasslink.com%2Fcallback&client_id=c141934310952145edfeee3df2a4079d07f217add9a018&response_type=code&state=f3dhsde

After you redirect users to the ClassLink Authorization endpoint, the end user will be prompted to consent access to the scopes requested.

If the user does not accept your request for access, you will receive an error parameter in your redirect_uri with access_denied.

https://www.classlink.com/callback?error=access_denied

After the user consents to access, the browser will be redirected back to your redirect_uri with a response code and state if it was sent in the original request.

https://www.classlink.com/callback?code=c1447346832048436sd039dds5c74d20g3x37e06f62cc04431&response_type=code&state=f3dhsde