Skip to Content
API referenceSign-in tickets

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": "…" }
FieldNotes
learnerIdMust already be a member of your organization; otherwise 404
destinationhome (default), courses, or course
enrollmentIdRequired 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

  1. Your server looks the user up: GET /platform/v1/learners?email=….
  2. It enrolls them in a course: POST /platform/v1/enrollments.
  3. It mints a ticket with destination: "course" and redirects the browser.
  4. The learner takes the course in MTP’s portal — its content, its metahuman conversations, its responses and assessments — step by step.
  5. 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.

Last updated on