Sign-in tickets
Your application authenticates its users however it likes. To hand one of them into MTP — to take a course, or see their course list — mint a sign-in ticket for that learner and redirect their browser to the URL you get back. The learner arrives in their own MTP portal session, with exactly the roles and permissions their membership grants. The machine credential never becomes a person.
The mechanism is the same one MTP uses to hand its own users into HOPE’s Studio.
Mint
POST /platform/v1/sign-in-tickets — scope learners.sign_in
{
"learnerId": "…",
"destination": "course",
"enrollmentId": "…"
}| Field | Notes |
|---|---|
learnerId | Must already be a member of your organization; otherwise 404 |
destination | home (default), courses, or course |
enrollmentId | Required for course; must belong to that learner, otherwise 403 |
{
"signInUrl": "https://api.train.hopemtp.app/platform/sign-in?ticket=…",
"expiresAt": "2026-09-05T14:01:30.000Z"
}Redeem
Redirect the learner’s browser to signInUrl (302). MTP redeems the ticket, sets the portal
session cookies, and redirects to the destination. The ticket:
- is valid for 90 seconds,
- is consumed on first use — a second presentation is refused,
- is stored only as a peppered hash, and
- can only land on one of the fixed portal paths above (it is not an open redirect).
A bad ticket lands on the portal’s login error page rather than a blank error.
Mint the ticket in the request that performs the redirect, not ahead of time. Ninety seconds is enough for a redirect and not enough for a bookmark.
Typical flow
- Your server looks the user up:
GET /platform/v1/learners?email=…. - It enrolls them in a course:
POST /platform/v1/enrollments. - It mints a ticket with
destination: "course"and redirects the browser. - The learner takes the course in MTP’s portal — its content, its metahuman conversations, its responses and assessments — step by step.
- Later, your server reads progress:
GET /platform/v1/enrollments/{id}.
Each step is audited in the tenant’s trail: the ticket issue names the key, and the learner’s
sign-in is recorded with the method PLATFORM_TICKET.