Okta Classic Engine /api/v1/authn state machine — deprecated for new development. Educational only: learn the legacy pipeline so you can migrate it to OIE/IDX and OAuth.
POST /api/v1/authn + factor sub-resourcesstateTokenstatus + _links.nextsessionToken (session cookie bootstrap)/oauth2/.../interact + /idp/idx/*stateHandleremediation options (ION protocol)interaction_code → OAuth access/ID tokens — see the IDX PipelineBegin an Authn transaction with primary credentials, a recovery token, or an activation token. The response status drives every step that follows.
Step-up authentication with no active session: POST an existing stateToken to /api/v1/authn to resume that transaction. The response status drives the rest of the flow.
Each response's status decides what happens next. Follow _links to verify factors, change passwords, or recover — until a response contains a sessionToken.
The transaction is complete — the response contained a one-time sessionToken (valid ~5 minutes, single use).
In OIE the terminal state is successWithInteractionCode: the client exchanges an interaction_code at the OAuth /token endpoint and receives access/ID/refresh tokens directly — no sessionToken redemption dance. Try the same journey on the IDX Pipeline page.
Exchange the one-time sessionToken for an Okta session. In the browser, visit the OIDC /authorize endpoint, the session redirect link, or an app embed link with the token attached. In the back channel, create the session with the Sessions API, or let the backend redeem it at /authorize + /token without a browser. Redeeming it one way consumes it. Guide ↗
OIDC without a browser — the backend sends GET /authorize?…&sessionToken=…, does not follow the redirect, reads the code from the 302 Location header and calls /token. The redirect_uri must be registered on the app but is never visited; response_type is always code here.
Sessions API — POST /api/v1/sessions with { "sessionToken" } creates the session server-to-server and returns the session object (id, login, expiresAt, status). The Okta session cookie never reaches this browser. Not part of the session-cookie guide, which only documents the browser methods.
Visiting the embed link with sessionToken sets the session cookie and starts SSO into that app (also works for SAML and WS-Fed app links).
# Complete the flow above to build the redemption URL
The sessionToken + sessionCookieRedirect pattern is the legacy session bootstrap. Modern apps never see a sessionToken: the OIE /token call returns OAuth tokens directly, and the Okta session is established during the interaction itself.