Exciting News!

Our transition to a new website is complete. Click here to seamlessly access the latest version of this article.

Kindly update any bookmarked URLs accordingly. The Development Center will no longer be accessible after April 1, 2024. Thank you for your attention to this matter.


GitHub and DLL Download Links

DLL Download


Insert OneClick.cs into your project.


Create a reference to the DLL in your project. To do this in Visual Studio 2017, right click Dependencies -> Add References -> Browse -> Select DLL -> Add.


First import OneClick if you're using a DLL.

using ClassLink_OneClick.OneClick;

Next, you need to create a new instance of OneClick with the client_key and client_secret.


Generate Bearer Token

getCodeUrl(scope, redirectUri)

Following that, you will need to generate the url for you to sign in and retrieve your code, which will be used to get the access token. This is done with the method getCodeUrl(scope, redirectUri).

The scope can be:

  • profile - Access to user identiy and user specific information
  • full - Access to all public apis

Scope will be defaulted to profile not included in method call.

The redirectUri is the url that you will be redirected to upon login. It defaults to https://localhost:8080/code.

You can use curl or get the code from the url bar after signing in.

// Prints the url for the code


After getting the code from the url, you need to generate the bearer token that will be used for all the requests. This will be generated using the getToken(code) method.

// Uses the code received after signing in and returns the bearer token 

Accessing the Endpoints

Now that you have your bearer token, you can access the endpoints. This can be done through a number of methods. The first method, getInfo, allows the user to specify what endpoint they want to hit and what field to return. The rest of the methods will make requests to specific endpoints for specific information.

getInfo(bearer, endpoint, extractNode)

The main method used to make a request to an endpoint is get_info(bearer, endpoint, extractNode). It takes in the bearer token, the url of the endpoint (excluding the hostname), and an optional extractNode, which will return this specific field if is not passed as an empty string.
It will return the info as a JSON response in a string.

// Prints the JSON response from the request to the endpoint
Console.WriteLine(oc.getInfo("cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "/path/info", ""));


This method will take in the bearer token and return a JSON containing all of the available user info

// Prints user info as JSON


This method will get the district associated with the user

// Prints the district as JSON


This method will get info on the user's profiles.

// Prints info on the user's profiles as JSON


If the user is a parent registered for ClassLink, this will return a list of linked student accounts (their children)

// Prints children info


Get a list of all groups that the user is a part of

// Prints a list of all groups that the user is a part of


Get all the OneRoster info about the user
Note: Only available for districts with OneRoster enabled.

// Print the oneroster info about the User


Get all the OneRoster classes the user is enrolled in.
Note: Only available for districts with OneRoster enabled.

// Print the oneroster info about user's classes

getUserOneRosterClassTeachers(bearer, classSourcedId)

Get info on the teacher of the class represented by the unique sourcedId.
Note: Only available for districts with OneRoster enabled.

// Print the oneroster info on the teacher of the class
Console.WriteLine(oc.getUserOneRosterClassTeachers("cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "sourcedId"));

getUserOneRosterClassStudents(bearer, classSourcedId)

Get info on the students of the class represented by the unique sourcedId.
Note: Only available for districts with OneRoster enabled.

// Print the oneroster info the students of the class
Console.WriteLine(getUserOneRosterClassStudents("cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "sourcedId"));