Guide for Developers

Developer docs

Students and teachers log in once, to Guide, and open your app already signed in. Your Northwork Developer Suite account holds your apps and API keys; Guide holds schools, classes and rosters.

Quick start

  1. On northwork.dev, create an app. Add your redirect URI(s), and optionally a login URL and a webhook URL. Create an API key bound to the app with the guide:access scope. Start with a test key (nw_test_…).
  2. Open Guide for Developers, sign in with Northwork, and choose Connect to Northwork. Pick your app.
  3. Add Log in with Guide to your app (below). Then use Open as teacher or Open as student on your app’s page to sign in as your test school’s accounts.
  4. When it works, choose Submit for review. Once the Guide team approves it, use a live key (nw_live_…) and teachers can add your app to their classes.

Log in with Guide

Log in with Guide is standard OpenID Connect (authorization code flow, PKCE supported). Any certified OIDC library works. Point it at the discovery document:

https://guidelearning.org/.well-known/openid-configuration
SettingValue
Issuerhttps://guidelearning.org
Client IDYour Northwork app id (nw_app_…), shown in Guide for Developers
Client secretA Northwork API key bound to the app with guide:access
Client authenticationclient_secret_basic or client_secret_post
Authorizehttps://guidelearning.org/oauth/authorize
Tokenhttps://guidelearning.org/oauth/token
Userinfohttps://guidelearning.org/oauth/userinfo
JWKS (id_token RS256)https://guidelearning.org/oauth/jwks
PKCES256 (recommended) or plain
Access tokens1 hour. There are no refresh tokens: people reopen your app from Guide.

Example (Node.js, no library)

// 1. Send the person to Guide
const verifier = base64url(crypto.randomBytes(32));
const challenge = base64url(crypto.createHash("sha256").update(verifier).digest());
const url = new URL("https://guidelearning.org/oauth/authorize");
url.search = new URLSearchParams({
  response_type: "code",
  client_id: process.env.NORTHWORK_APP_ID,          // nw_app_…
  redirect_uri: "https://yourapp.example/auth/guide/callback",
  scope: "openid profile school classes roster",
  state, nonce,
  code_challenge: challenge, code_challenge_method: "S256",
}).toString();
res.redirect(url);

// 2. On your callback, swap the code for tokens
const tokens = await fetch("https://guidelearning.org/oauth/token", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded",
    Authorization: "Basic " + btoa(APP_ID + ":" + process.env.NORTHWORK_API_KEY),
  },
  body: new URLSearchParams({
    grant_type: "authorization_code", code, redirect_uri, code_verifier: verifier,
  }),
}).then((r) => r.json());
// tokens.id_token (verify with the JWKS), tokens.access_token

// 3. Who signed in?
const me = await fetch("https://guidelearning.org/oauth/userinfo", {
  headers: { Authorization: "Bearer " + tokens.access_token },
}).then((r) => r.json());
// { sub, name, role: "student" | "teacher" | "school_admin", school, classes, test }

Errors returned to your redirect URI

Guide returns error and error_description (plus your state). The most common is access_denied: for example, a student whose teacher hasn’t added your app to their class, or an app that isn’t approved yet. login_required is returned for prompt=none when the person isn’t logged in to Guide. Every refusal also appears in your app’s sign-in log.

Opening from My apps

Students and teachers open your app from Guide. Guide sends them to your app already logged in to Guide, so your sign-in completes without a password:

  • With a login URL (recommended): Guide opens <login_url>?iss=https://guidelearning.org&login_hint=<sub>&target_link_uri=<login_url>. Start a normal Log in with Guide request from there (OpenID Connect third-party initiated login).
  • Without a login URL: Guide sends a code straight to your first redirect URI: <redirect_uri>?code=…&iss=https://guidelearning.org, with no state and no PKCE. Swap it at the token endpoint as usual. Your callback must accept a code it didn’t ask for.

Scopes and claims

Guide never shares email addresses. The sub is a stable Guide id for the person.

ScopeAdds
openidRequired. sub, role, test
profilename
schoolschool { id, name } (id_token: school_id)
classesclasses: the person’s classes that have your app
rosterLets teachers and school administrators list students with the data API

role is student, teacher or school_admin. test is true for your test school’s accounts.

{
  "sub": "5b1c…",
  "name": "Ava Cohen",
  "role": "teacher",
  "test": false,
  "school": { "id": "9e0f…", "name": "Riverside Middle School" },
  "classes": [
    { "id": "c71a…", "name": "Period 3 Science", "school_id": "9e0f…",
      "teacher": { "id": "5b1c…", "name": "Ava Cohen" }, "student_count": 24 }
  ]
}

Data API

Base URL https://guidelearning.org/api/v1. Classes always live in Guide; read them here instead of asking teachers to set them up again. Authenticate with either:

  • An access token from Log in with Guide (Bearer gat_…): acts as that person.
  • Your Northwork API key (Bearer nw_live_…): your server, for every class that uses your app. Test keys only see your test school.
EndpointReturnsAuth
GET /meThe signed-in person (same as userinfo)Access token
GET /classesClasses that have your app. With a key, filter by ?school_id=Either
GET /classes/{id}/students{ students: [{ id, name }] }Teacher or admin token with roster, or key
GET /schoolsSchools where your app is in at least one classKey
curl https://guidelearning.org/api/v1/classes \
  -H "Authorization: Bearer $NORTHWORK_API_KEY"

Webhooks

Guide posts JSON to your app’s webhook URL (set on northwork.dev) when something changes. Respond with any 2xx within 6 seconds.

EventWhen
class.app_addedA teacher adds your app to a class
class.app_removedA teacher removes your app from a class
class.student_addedA student joins a class that has your app
POST /your/webhook
Guide-Signature: t=1764000000,v1=5f2c…
Guide-Event-Id: gevt_…
Guide-Event-Type: class.student_added

{
  "id": "gevt_…",
  "type": "class.student_added",
  "created_at": "2026-11-24T15:00:00.000Z",
  "school": { "id": "9e0f…", "name": "Riverside Middle School" },
  "class": { "id": "c71a…", "name": "Period 3 Science", "teacher_id": "5b1c…" },
  "student": { "id": "a3d9…", "name": "Noah Levi" },
  "test": false
}

Verify the signature

Each app has a webhook signing secret (whsec_…) in Guide for Developers. The signature is an HMAC-SHA256 of <t>.<raw body>, the same format as northwork.dev webhooks. Reject events more than 5 minutes old, and use Guide-Event-Id to ignore repeats.

import crypto from "node:crypto";

function verifyGuideWebhook(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1 ?? ""));
}

Test school and keys

When you connect your first app, Guide creates a private test school for you with a School administrator, a Teacher, a class and test students. Your apps are added to that class. Open your app as any of them from your app’s page in Guide for Developers, add more test students, and send test webhooks. Nobody else sees your test school.

KeyWorks for
nw_test_…Your test school only, before and after approval
nw_live_…Real schools once Guide approves your app (and your test school)

Review

Submit your app from Guide for Developers when it’s ready. The Guide team tries it in your test school and approves it or asks for changes; you’ll see the result and any note there and on northwork.dev. Make sure your app has a clear description, a privacy policy link and a support email on northwork.dev. Approved apps appear in the app catalog, where teachers add them to classes.

Questions? Email [email protected].