Vendor integration guide
For product teams connecting an app to EduSpaze. Everything here is available from your Startup portal under Integration & API. API version 2026-09-06 (returned in the X-EduSpaze-Api-Version header); this guide last updated 2026-10-18, adding how users sign in to your app (§10, §11). Questions: your EduSpaze partner manager.
1. What you integrate, and why
Schools connect pupils to your app through EduSpaze. Three things flow between us:
- Launch — a pupil, or a teacher, clicks "Open" in EduSpaze and arrives in your app with a pseudonymous id. You never receive a name, an email or a date of birth.
- Roster — you read which class and groups each of your connected pupils is in, and which pseudonymous teacher teaches those classes, so you can place people correctly.
- Telemetry — you tell us when that pupil was active, so the school and (where the school allows it) the parent can see *when* and *how long*. Never *what*: we do not accept scores, content or activity detail, and the API has no field for them.
Signing users in to your own app (optional, added October 2026). If pupils and staff sign in on your own login page rather than arriving through the launch, two ways take them straight in from EduSpaze with no login page:
| What you build | Section | Worked example | |
|---|---|---|---|
| EduSpaze-assisted sign-in | One signed endpoint that returns a one-time sign-in link for the user's account | §10 | Building the one-time sign-in link |
| Sign in with EduSpaze | Standard OpenID Connect login, as you would add "Sign in with Google" | §11 | Adding Sign in with EduSpaze |
Either is enough; both can run side by side. If your login page is a Google or Microsoft button, EduSpaze can also send users through it with login_hint. §12 says which route EduSpaze takes when you have set up more than one.
Integration tiers shown on your listing:
| Tier | Requirement |
|---|---|
| Tier 1 · Certified SSO | SAML2/OIDC or LTI 1.3 with the school, plus telemetry |
| Tier 2 · Connected | Signed launch handshake (this guide) plus telemetry |
| Tier 3 · Listed (shown as *Catalogue* in the portals since 2026-10-29) | No integration; pupils use the EduSpaze app frame and we estimate engagement |
Both sides of this integration are also asked to follow the roster mapping protocol: the lifecycle from agreement to exit, what the school owes you, what you owe the school, and what is never shared in either direction.
2. Credentials
Issue both from Integration & API. Each is shown once; rotate if lost.
| Credential | Format | Used for |
|---|---|---|
| API key | esk_… (47 chars) | Authorization: Bearer on every telemetry call |
| Launch signing secret | els_… | Verifying the HMAC on launch parameters |
We store only a hash of the API key. Rotating either credential invalidates the previous one immediately.
3. Launch handshake
Set a Launch URL (https only). When a pupil opens your app we redirect the browser to it with these query parameters:
| Parameter | Meaning |
|---|---|
subject | Pseudonymous pupil id, stable per school (e.g. RB-4213). Use it as your user key. |
tenant | EduSpaze school id. Send it back on every telemetry call. |
ts | Unix milliseconds when the launch was signed |
nonce | Random per launch |
sig | HMAC-SHA256 over the canonical string, hex encoded |
Canonical string: the four parameters (not sig) sorted by name, joined as key=value with &:
nonce=<nonce>&subject=<subject>&tenant=<tenant>&ts=<ts>
Verify before trusting subject:
import { createHmac, timingSafeEqual } from "node:crypto";
function verifyLaunch(secret, q) {
if (Math.abs(Date.now() - Number(q.ts)) > 5 * 60_000) return false; // 5-minute window
const canonical = ["nonce", "subject", "tenant", "ts"].map((k) => `${k}=${q[k]}`).join("&");
const expected = createHmac("sha256", secret).update(canonical).digest("hex");
return expected.length === q.sig.length && timingSafeEqual(Buffer.from(expected, "hex"), Buffer.from(q.sig, "hex"));
}
Reject replays by remembering nonces for five minutes. If you leave the Launch URL empty, pupils open your listing inside the EduSpaze app frame instead and we measure engagement ourselves (estimated tier).
3.1 v2 — class information on the launch (opt in)
Switch on Send class information on launch under Integration & API and the launch carries who the person is to their school and where they belong:
| Parameter | Sent for | Meaning |
|---|---|---|
v | everyone | 2. Absent means v1. |
role | everyone | student, teacher, staff or school_admin |
classes | everyone | comma-joined class ids — for a pupil the class they are in, for a teacher every class they teach |
class, className, year | pupils | the pupil's single current class, for convenience |
groups | pupils | comma-joined group ids (reading group, CCA, intervention) |
Every id is the same value GET /roster returns, so the two agree.
Read this before switching it on. In v2 the signature covers every parameter present, not the original four. The verifier in §3 hard-codes ["nonce","subject","tenant","ts"] — that verifier will reject a v2 launch. Sign whatever you receive instead:
const canonical = Object.keys(q).filter((k) => k !== "sig").sort().map((k) => `${k}=${q[k]}`).join("&");
That expression is correct for v1 and v2 alike, so make the change first and switch v2 on after. This is why v2 is opt-in per vendor and why nothing changes for you until you ask.
3.2 Teachers
A teacher opening your app from their school portal arrives through the same handshake, with role=teacher and the classes they teach. Their subject is a staff code (STF-0003), pseudonymous and stable within that school, in the same namespace as pupil subjects — so one subject column holds both. Teachers appear in the roster too, so you can build their view before they ever arrive.
4. Telemetry API
Base URL: https://<eduspaze-host>/api/vendor/v1. JSON request and response bodies. Header on every call: Authorization: Bearer esk_….
GET /me
Credential check. Returns your vendor id, product name, tier, launch settings — including whether launch v2 is on (launchRosterClaims) — and tenants: the schools where you have live connections, with their ids. Those are the only tenantId values the other endpoints accept, so this is where a sync starts.
{ "vendorId": "…", "productName": "Practicle", "integrationTier": "CONNECTED",
"launchUrl": "https://…", "launchSigningConfigured": true, "launchRosterClaims": false,
"tenants": [{ "id": "sch_…", "name": "Riverbank School" }] }
POST /heartbeat
Send while a pupil is active in your app — once per pupil per minute is enough — and once more with "kind": "end" when they leave.
{ "tenantId": "<tenant from launch>", "subject": "<subject from launch>", "kind": "ping", "at": "2026-09-02T08:15:00Z" }
| Field | Required | Notes |
|---|---|---|
tenantId | yes | the tenant launch parameter |
subject | yes | the subject launch parameter |
kind | no | ping (default) or end |
at | no | ISO-8601; defaults to now; must be within ±15 minutes |
Response: { ok, sessionId, deduped, recommendedIntervalSeconds }. deduped: true means the ping was within 15 seconds of the previous one and was ignored. Pings are folded into the pupil's session on our side; you do not need to track sessions to use this endpoint.
POST /sessions
Completed sessions from your own records — the highest-confidence source. Batch up to 500.
{ "sessions": [
{ "tenantId": "<tenant>", "subject": "<subject>", "startedAt": "2026-09-01T09:00:00Z", "endedAt": "2026-09-01T09:45:00Z" }
] }
Rules: endedAt after startedAt, at most 12 hours long, not in the future. A session is identified by tenant + you + subject + startedAt; re-sending a batch is safe and is reported as duplicates. Response: { ok, accepted, duplicates, rejected }. rejected counts subjects we could not match to an active connection for you — never a reason to retry.
Errors
| Status | Meaning |
|---|---|
| 400 | Malformed body; issues[] lists the problems |
| 401 | Missing or invalid key (we never say which) |
| 404 | Unknown subject for this tenant and vendor |
Which endpoint should I use?
- Need to know which class someone is in?
GET /roster(nightly is fine), or opt in to launch v2 to be told as they arrive. Doing both is normal: the launch places them immediately, the roster keeps you right when a school moves somebody between classes.
- Can you post completed sessions from your logs? Use
/sessions(nightly batch is fine). - Can you only signal presence in real time? Use
/heartbeat. - Both is best: heartbeats give the school a same-day picture, sessions make it exact. We merge them; nothing is counted twice.
5. Roster API
GET /roster
GET /api/vendor/v1/roster?tenantId=<tenant>[&updatedSince=<iso>][&cursor=<cursor>][&limit=200]
The pupils connected to you at one school, with their class and group codes, plus the pseudonymous teachers of those classes.
{
"ok": true,
"tenantId": "sch_…",
"pupils": [
{ "subject": "RB-4213", "yearGroup": "Year 5", "className": "5A",
"classes": [{ "id": "cls_…", "name": "5A", "yearGroup": "Year 5", "academicYear": "2026/27" }],
"groups": [{ "id": "grp_…", "name": "Reading group B" }],
"connectedAt": "2026-08-20T…", "updatedAt": "2026-09-01T…" }
],
"staff": [
{ "subject": "STF-0003", "role": "TEACHER", "classes": [{ "id": "cls_…", "name": "5A" }], "updatedAt": "2026-09-01T…" }
],
"nextCursor": null
}
| Parameter | Notes |
|---|---|
tenantId | required; the tenant from a launch |
updatedSince | ISO-8601. Returns pupils whose record, connection, enrolment or group membership changed since. Coarse on purpose — you may be handed a row you already had, never miss one that moved. |
cursor | from a previous nextCursor |
limit | 1–500, default 200 |
Scope: only pupils with an active connection to you, only in the tenant you name. An unknown tenant and a tenant where you have no pupils answer identically — an empty roster — so this endpoint cannot be used to find out which schools are on the platform.
Sync nightly, or after a launch whose class you do not recognise. Class and group names are teaching labels, not personal data; nobody's name, email or date of birth appears here.
6. What schools and parents see
Minutes per pupil per app, labelled by confidence: *Reported by the app* (your sessions or heartbeats), *Estimated from activity* (our heartbeat when a pupil uses the app frame), or *Launch only*. Parents see a timeline heat map; a launch with no telemetry appears as a single "opened" mark, never as time. Details: Engagement tracking.
7. Data protection
- The subject id is pseudonymous and per school — pupils (
RB-4213) and staff (STF-0003) alike. Do not attempt re-identification. - Class and group ids are opaque and per school. Their names are teaching labels; do not treat them as free text about a person.
- When a school revokes a connection,
subjectstops being accepted; delete what you hold for it within your agreed retention. - When a school anonymises a pupil, the id is retained on our side only as a token; historic telemetry stays time-only.
- The API stores no free text. Do not send names in any field.
8. Try it against the demo
The demo dataset ships a fixed key for the vendor Practicle so the flow can be exercised:
Authorization: Bearer esk_demo_practicle_telemetry_key_0000000000000
Take a tenantId from GET /me (Riverbank School in the demo) and use subject RB-4213:
curl -s https://<eduspaze-host>/api/vendor/v1/me -H "Authorization: Bearer esk_demo_practicle_telemetry_key_0000000000000"
curl -s -X POST https://<eduspaze-host>/api/vendor/v1/heartbeat \
-H "Authorization: Bearer esk_demo_practicle_telemetry_key_0000000000000" -H "Content-Type: application/json" \
-d '{"tenantId":"<riverbank id>","subject":"RB-4213"}'
Then open School → Engagement (as riverbank@school.demo) to see the session appear. Production keys are random, issued from the portal and shown once.
9. Per-user activation API (plans using the API method)
When a plan's activation method is API (docs/vendor-activation.md), EduSpaze calls your endpoint once per user. It calls when the user first opens your app (or when the school activates everyone), and again when their access ends. Every call is an HTTPS POST with a JSON body, and has three headers:
| Header | Value |
|---|---|
X-EduSpaze-Event | user.activate, user.deactivate or ping |
X-EduSpaze-Timestamp | Unix milliseconds |
X-EduSpaze-Signature | v1= + hex HMAC-SHA256 over <timestamp>.<raw body>, keyed with your launch signing secret |
Verify the signature over the raw bytes, reject anything older than five minutes, then act:
{ "event": "user.activate", "tenant": "<school id>", "subject": "RB-4213", "role": "student",
"plan": { "familyId": "…", "version": 2, "name": "School licence" },
"contract": "<contract id>", "start": "2026-10-01T00:00:00.000Z", "end": "2027-10-15T00:00:00.000Z",
"sentAt": "…" }
Reply 200 with JSON. Every field is optional:
| Field | Meaning |
|---|---|
accountId | Your id for the account. It is sent back to you on user.deactivate. |
loginUrl | An https link the user should go to. |
activationCode | A code EduSpaze shows to that user alone, to redeem on your side. |
user.deactivate carries the same body plus accountId and reason. Switch the account off and reply 200. Any other status, or no answer within 8 seconds, counts as a failure, and EduSpaze retries hourly. ping is EduSpaze checking the endpoint before marking you ready: reply 200.
You never receive a name or an email: subject is the same pseudonymous id the launch uses. Class and group information comes only through launch v2 and the roster API, and only once the school shares it.
10. Sign-in pages and the one-time sign-in link (optional)
*Added October 2026. Nothing in §1–§9 changes: the launch, the telemetry and roster APIs and the activation API work exactly as before.*
If school users sign in to your app on your own page — rather than arriving through the signed launch — tell EduSpaze where, under Integration → Sign-in pages in the startup portal: one page for staff, one for pupils. For each, choose its sign-in type (form post, JavaScript app, sign-in API, sign-in link, or Google/Microsoft), let the copilot check the page, add a test account and run a test sign-in. The page shows Verified (green) once a test sign-in works, Unverified (amber) after any change is saved, and Error (red) when a test or check fails. Full detail: docs/vendor-sign-in.md.
The smoothest type for users is the sign-in link. When a user opens your app, EduSpaze posts to your endpoint, signed exactly as in §9, with X-EduSpaze-Event: user.signin:
{ "event": "user.signin", "subject": "STF-0003", "role": "teacher",
"loginHint": "teacher@school.example", "sentAt": "…" }
| Field | Meaning |
|---|---|
subject | The pseudonymous id, as in the launch and §9. |
role | student, teacher or staff. |
account | *Added with school-managed accounts.* Your own username for this user — the account the school assigned them in EduSpaze (an email or login you issued). Present whenever the school has assigned one; sign that account in. |
loginHint | Staff only: the school email they hold an account with you under. A pupil's call never carries one — map subject to the pupil's account yourself (§9 or the roster). |
test | true on a test sign-in from the sign-in pages screen. Answer it like any other, for a test user. |
Reply 200 with { "url": "https://…" }: a link that signs the user in once and expires within a few minutes. EduSpaze sends the user straight to it — no EduSpaze page in between, no sign-in page of yours. A worked example for a Laravel API with a React app is in Building the one-time sign-in link. Anything else — another status, no url, no answer within 8 seconds — and the user is taken to your sign-in page instead, with EduSpaze's help, so nobody is stranded.
11. Sign in with EduSpaze (OpenID Connect)
*Added October 2026. Nothing in §1–§10 changes.*
EduSpaze is an OpenID Connect provider. Add it to your app the way you add "Sign in with Google", and every pupil and member of staff a school has given your app signs in with one click — whatever they signed in to EduSpaze with, including pupils on a username and PIN.
Register under Integration → Sign in with EduSpaze in the startup portal: your exact https redirect address(es), and optionally your sign-in start address. You get a client ID and a client secret (shown once; keep it on your server). Then configure your OpenID Connect library with:
| Setting | Value |
|---|---|
| Discovery | https://www.eduspazeconnect.com/.well-known/openid-configuration |
| Flow | authorization code; PKCE S256 supported; client secret by HTTP Basic or in the body |
| Scopes | openid (required), email, profile |
| Signing | RS256; keys at /api/oidc/jwks |
What you receive (ID token and /api/oidc/userinfo):
| Claim | Value |
|---|---|
sub | <tenant>:<subject> — stable per user |
tenant, subject | the school and the pseudonymous id your launches and roster already use (§3, §5) |
role | student, teacher, staff or school_admin |
preferred_username | the account the school assigned the user at your app (an email or login you issued); for staff without one, their school email |
email, email_verified | scope email: that account when it is an email; a member of staff's school email |
name | scope profile: staff only. EduSpaze never sends a pupil's name |
Match the user to their account by preferred_username. Only users a school has given your app get a code — a pupil connected to it, staff when the school has opened it to teachers; anyone else is stopped on an EduSpaze page. Codes are single use and last two minutes.
Straight in from EduSpaze. With a sign-in start address set, a user who opens your app in EduSpaze is sent there with iss and login_hint (OpenID Connect third-party initiated login). Start your normal "Sign in with EduSpaze" from it; someone already signed in to EduSpaze comes straight back with a code, so they land in your app signed in without a click.
A worked example for a Laravel web app and a React app: Adding Sign in with EduSpaze.
12. Which sign-in EduSpaze uses when a user presses Open
*Added October 2026. Nothing in §1–§11 changes.*
For an app whose users sign in on its own page, EduSpaze takes the first of these that applies, for each user, every time they press Open:
| # | When | Where the user goes |
|---|---|---|
| 1 | You set a sign-in start address for Sign in with EduSpaze (§11) | That address, with iss and login_hint; you start the OpenID Connect sign-in and EduSpaze answers at once |
| 2 | The school chose Single sign-on first for your app, the user signed in to EduSpaze with Google or Microsoft, and your sign-in page for them is a button for the same provider | Your Google or Microsoft start address, with login_hint = the email they signed in with |
| 3 | Your sign-in page type is Sign-in link (§10) and your endpoint answers within 8 seconds | The one-time link you return |
| 4 | Your sign-in page type is Google or Microsoft | That start address, with login_hint = a staff member's school email, or the email a pupil signed in to EduSpaze with (none for a pupil on a PIN) |
| 5 | Anything else, or a step above fails | EduSpaze's sign-in help page: the account the school assigned them at your app, then your login page |
For route 2 and 4, pass login_hint on to the identity provider when your Google or Microsoft sign-in starts. The provider then signs in that account without asking which one, and someone already signed in to it in that browser goes straight through.
Before any route, EduSpaze makes sure the user holds the account the school gives them at your app: the one the school assigned, or the next free one from the school's pool when the school hands accounts out automatically. That account is what arrives as account (§10) and preferred_username (§11).
13. Opening inside EduSpaze (optional)
*Added October 2026. Nothing in §1–§12 changes: the launch your app receives is the same.*
Your app has an address on EduSpaze, https://www.eduspazeconnect.com/app/access/<slug> (shown on Integration & API; EduSpaze sets it). Pupils and staff open your app there. Where your site allows it, EduSpaze shows your app inside its own page — the same launch, in a frame — and measures how long it is used (active, idle, stopped) without your app sending anything. Otherwise it opens in a tab of its own, exactly as before.
To allow it:
- Send
Content-Security-Policy: frame-ancestors https://www.eduspazeconnect.com(add it to any list you already send) on your launch URL and sign-in pages, and noX-Frame-Options: DENYorSAMEORIGIN. - Mark the cookies that keep users signed in
SameSite=None; Secure. A browser drops any other cookie inside another site's page, so aLaxsession cookie signs users out on every step. - Run the test on Integration & API → *Opening inside EduSpaze*. It turns Verified when every page allows it; the copilot explains anything that stops it. Full rules: Opening apps inside EduSpaze.
