Exchange App Session
POST /app-sessions/exchange
PREVIEW. This endpoint is deployed but gated: it returns 404 unless the hosted app platform is enabled for your organization. It is published here so the contract describes the whole surface, not so it can be called today.
Mint a short-lived browser app token for the authenticated PropelAuth principal.
Auth is the EXISTING get_current_user PropelAuth dependency — no valid
principal -> 401. subject / client_org_id / role are derived
SERVER-SIDE from that validated principal (derive_browser_identity), never
from body — a forged identity/role in the body has no effect. Minting also
requires a consented installation of the target app in the principal’s org (403).
A fail-closed per-principal / per-app limiter throttles the mint (429).
Authorizations
Parameters
Header Parameters
Request Body required
Body for the browser exchange — target app + non-identity params ONLY.
Identity is DERIVED SERVER-SIDE from the authenticated PropelAuth principal
(locked decision §5: “browser auth = PropelAuth login -> short-lived graph8
app token”): subject / client_org_id / role come from the
validated principal, never from this body, so a client cannot self-assert who
it is or escalate its role. Any subject / client_org_id / role
keys a caller forges into the body are ignored (pydantic drops unknown fields).
object
Target app id (dapp_-prefixed)
Scopes to embed in the token
Responses
200
Successful Response
object
The minted token + the non-secret metadata a client needs.
object
The signed app JWT
App the token is bound to
The distinct-per-app, per-environment audience
Lifetime in seconds
Signing key id (matches a JWKS entry)
Always ‘Bearer’
422
Validation Error