Product: Partner Portal
Audience: Partner Administrator & Developer
Overview
GET - https://nodeapi.classlink.com/v2/my/info
cURL
curl --request GET \
--url https://nodeapi.classlink.com/v2/my/info \
--header 'authorization: Bearer {bearer_token}'
Node
var request = require("request");
var options = {
method: 'GET',
url: 'https://nodeapi.classlink.com/v2/my/info',
headers: {authorization: 'Bearer {bearer_token}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Ruby
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://nodeapi.classlink.com/v2/my/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {bearer_token}'
response = http.request(request)
puts response.read_body
JavaScript
var data = null;
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://nodeapi.classlink.com/v2/my/info");
xhr.setRequestHeader("authorization", "Bearer {bearer_token}");
xhr.send(data);
Python
import requests
url = "https://nodeapi.classlink.com/v2/my/info"
headers = {'authorization': 'Bearer {bearer_token}'}
response = requests.request("GET", url, headers=headers)
print(response.text)
Headers
Authorization (string)
Bearer Token
Sample Result
JSON
{
UserId: 1516492
TenantId: 2
BuildingId: 1
AuthenticationType: 2
DisplayName: "Reading Student"
FirstName: "Reading"
LastName: "Student"
Email: "480150801709112015161127962@demo.local"
LoginId: "4801508017"
ImagePath: ""
LanguageId: 1
DefaultTimeFormat: 0
Profile: "Developer Student Profile"
ProfileId: 3280
Tenant: "ClassLink Demo"
Building: "CL Demo Building1"
Role: "Student"
LastAccessTime: "2015-11-12T19:25:32.000Z"
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. |
Updated: September 2020