Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This NodeJS SDK is out-of-date and is no longer supported. However, the Edlink API is straightforward to call directly from a programming language of your choice. Check out our docs here:


npm version

This Edlink JavaScript & TypeScript SDK is a NodeJS wrapper for the Edlink API.

Quickstart Guide

Install the edlink-js package using npm or yarn.

yarn add @edlink/edlink-js
// Import edlink-js
const { Edlink } = require('edlink-js');

// Check your connection with Edlink's API.
const up = await Edlink.up();

Meta API

const { Edlink } = require('edlink-js');

// Use your application secret key to access the v1 Meta API.
const meta = Edlink.v1.meta('<application secret key>');

// Loop through all integrations.
for await (const integration of meta.integrations.list()) {
    // Get the integration access token. You can use this to make Graph API calls.
    const access_token = integration.access_token;

Graph API

const { Edlink } = require('edlink-js');

// Use your integration access token to access the v1 or v2 Graph API.
const graph = Edlink.v2.graph('<integration access token>');

// Fetch a single object.
const person = await graph.people.fetch('<person id>');

// Loop through all objects.
for await (const person of graph.people.list()) {
    // Do something with each person.

// Loop through all objects with a filter applied.
const filter = Filter.where('first_name', 'equals', 'Chris')
    .and('last_name', 'is known');
for await (const person of graph.people.list(filter)) {
    // Do something with each person. (You'll only get ones that match the filter.)

// Listing everything in an integration can take a while, so we don't recommend doing it
// more often than you need to. Review our guides on Class Rostering and Events for more info:

User API

const { Edlink, Auth } = require('edlink-js');

// Create an auth session. This will automatically refresh the access token
// whenever it expires, so you won't have to worry about doing it yourself.
const identity = await Auth.from({
    access_token: '<access token>',
    refresh_token: '<refresh token>',
    expires: new Date('2021-09-07T16:39:15Z')
}, '<application id>', '<application secret>');

// You can also create an auth session directly from an SSO authorization code.
// This is a shortcut for "Exchange the Code for Access and Refresh Tokens" in the
// following guide:
const identity = await Auth.fromCode(
    '<redirect uri>', // the redirect uri that you used to retrieve the code
    '<authorization code>', // the `code` you received as a url parameter
    '<application id>', '<application secret>');

// Access the v1 User API using that identity.
const user = Edlink.v1.user(identity);

// Make calls as this user. Looping and fetching follows the same pattern as
// the Graph and Meta APIs, but this API features additional endpoints that
// support creating, updating, and grading for assignments and submissions.
const course = await'<course id>');
const successful = await, '<assignment id>', '<submission id>', 100);

// Once you're done, make sure to persist the user's access token, refresh token
// and expiration date to your own database-- they might have changed during this process.
const { access_token, refresh_token, expires } = identity;


An Edlink API wrapper for NodeJS.






No releases published


No packages published