Accessing User Data

๐Ÿ“˜

Authorization Header

All the REST APIs require the Authorization header with Bearer {access_token} obtained from the previous step.

You can now use the access_token to access data for the currently logged in user. The root endpoint for accessing data can be found at https://nodeapi.classlink.com and documented in the OneClick SSO REST API section.

Get User Info##

Let's fetch the user info for the currently logged in user with your access token! If you are looking for identity information, you can use the https://nodeapi.classlink.com/v2/my/info endpoint.

Simply do a GET request with Authorization : Bearer {access_token} as a header to https://nodeapi.classlink.com/v2/my/info.

The API will respond with details related to the user.

๐Ÿ“˜

TenantId

The TenantId will identify which district the user is from. Please make sure you know what tenantId is assigned to the school district you are working with

{
UserId: 1516492,
TenantId: 2,
StateId: 2,
StateName: "New Jersey",
BuildingId: 1,
AuthenticationType: 2,
DisplayName: "Reading Student",
FirstName: "Reading",
LastName: "Student",
Email: "[email protected]",
LoginId: "4801508017",
ImagePath: "",
LanguageId: 1,
Language: "en",
DefaultTimeFormat: 0,
Profile: "Developer Student Profile",
ProfileId: 3280,
Tenant: "ClassLink Demo",
Building: "CL Demo Building1",
Role: "Student",
Role_Level: 4,
LastAccessTime: "2015-11-12T19:25:32.000Z",
OrgId: ""
SourcedId: "4801508017"
}

Name

Description

UserId

Unique ID assigned to the user within ClassLink

TenantId

ID assigned to the school district. Ensure you are working with users in the proper Tenant ID.

LoginId

AD username if it exists. Most school districts use Active Directory and this will be populated with their AD username.

Tenant

Name of the school district the user is from.

Building

Name of the domain. Most districts usually just have one building/domain configured.

Role

available roles are Student, Teacher, Tenant Administrator

SourcedId

If the district has OneRoster enabled, this will have the sourcedId of the user from OneRoster.

๐Ÿšง

Access Denied!

Some endpoints may not work if you do not request the proper scopes.