Mint a portal session token
Developer Platform, Sandbox & Key Management
/session
Mint a portal session token
createPartnerSessionExchanges a Firebase ID token (the partner's portal login) for a short-lived ms_oauth_ access token that can be sent as Authorization: Bearer <token> to any partner endpoint. This exists because partner API keys are stored only as SHA-256 hashes: the raw pk_live_ key is displayed once, at issue or rotation, and is unrecoverable afterwards. GET /me can therefore only return a mask. A signed-in portal session uses this endpoint to obtain a credential it can actually call with. The token carries the active organization member and mirrors the underlying key's scopes and type. Effective access is the intersection of member permissions, key scopes, organization security policy, and environment policy. It expires after 1 hour and can be revoked earlier. Server-to-server integrations should keep using their pk_live_ key directly, or the OAuth client-credentials flow (POST /partner/oauth/token) — not this endpoint.
Parameters
This endpoint has no path or query parameters.
Headers
AuthorizationstringRequiredBearer Firebase ID token from your partner portal session.
Response fields
accessTokenstringSend as Authorization: Bearer <accessToken>. Prefixed ms_oauth_.
tokenTypeBearerexpiresInintegerLifetime in seconds (3600).
keyTypefull | dataMirrors the underlying key. data tokens are read-only market-data credentials.
memberobjectmember.idstringRequiredmember.uidstringmember.emailstringRequiredmember.displayNamestring | nullmember.roleIdsstring[]Requiredmember.permissionsstring[]Requiredmember.statusINVITED | ACTIVE | SUSPENDED | REMOVEDRequiredmember.activeSessionCountintegerpermissionsstring[]sessionIdstringResponse codes
200A short-lived partner access token.401Missing or invalid Firebase ID token.403No partner key provisioned for this account, or the key is suspended/revoked.