createPortalAuthorizationCode
Create a one-time, PKCE-bound portal authorization code (browser handoff). The identity origin that holds the player's SESSION token (Studio's hosted sign-in, or a native launcher) calls this; redirect the player to the destination game carrying the code, which the game exchanges via exchangePortalCode. An untrusted app needs the player's consent grant first (authorizeApp), else FORBIDDEN prefixed CONSENT_REQUIRED. Refused like mintAppToken before any code exists: TERRITORY_NOT_SUPPORTED, AGE_REQUIRED, AGE_REQUIREMENT_NOT_MET, LEGAL_ACCEPTANCE_REQUIRED and EMAIL_CONFIRMATION_REQUIRED, and for a player under 18 SAFETY_LOG_REQUIRED (the app keeps no safety log) then SAFETY_MODERATOR_REQUIRED (its organization has no safety moderator), with the same neutral messages. Requires a SESSION token.
createPortalAuthorizationCode(
input: CreatePortalAuthorizationCodeInput!
): PortalAuthorizationCode!
Arguments
createPortalAuthorizationCode.input ● CreatePortalAuthorizationCodeInput! non-null input
Type
PortalAuthorizationCode object
A one-time portal authorization code. Redirect the player to redirectUri carrying code; the destination game exchanges it (with its PKCE verifier) via exchangePortalCode for an app token. Single-use and short-lived.