ot_ptk_…) belongs to exactly one install.
The Consent Deep Link
Send your customer (an OpenTrain employer — specifically the organization owner) to:
On the consent screen the customer sees your app’s name, the scopes you requested, and — if you requested
participants:email — a separate, explicit PII consent checkbox for Work Email sharing. They can approve or decline.
The One-Time Token
When the customer approves, OpenTrain mints an install-scopedot_ptk_… token and displays it once, on the consent screen only. The customer copies it into your platform’s integration settings.
Scopes
Your app requests a subset of these seven scopes when you register it; the customer sees each one described on the consent screen:participants:email is double-gated: the scope must be granted and the install must have piiConsent: true. If the customer granted the scope but left the consent box unchecked, requests that would return Work Email are refused with 403 at request time — and webhook payloads simply omit the workEmail field.
Inspecting Your Install
GET /installs/current returns the install your token belongs to — useful as a connectivity check and to confirm which scopes and consent you actually have:
What Every Request Requires
Beyond the right scope, every Platform API request checks four things. Any of them failing yields401 or 403:
- A live token — not revoked or expired
- An
ACTIVEinstall - An
ACTIVEplatform app - The annotation-platform feature enabled for the granting employer’s account
Reconnecting
If a customer runs the consent flow again for an app they already installed, OpenTrain revokes all previous tokens for that install before minting the fresh one. A scope reduction on reconnect therefore cannot be bypassed by holding on to an older, broader token. Treat any401 as a signal to ask the customer to reconnect.
Revocation
Customers can disconnect your app at any time from their OpenTrain integrations page. Disconnecting immediately:- Flips the install to
REVOKED - Revokes every access token — your next request returns
401 - Emits an
install.revokedevent to webhook deliveries already queued - Stops all new event fan-out for that install
install.revoked by ceasing work for that customer and marking the connection as disconnected in your UI.