refreshAppToken
Rotate the calling app token for a fresh one (same app, extended TTL) and revoke the old. Call before the current token expires to keep playing without bouncing back through the Overworld. Allowed for app-scoped tokens; re-checks entitlement. NATIVE CLIENTS: pass currentServer (the ip4 + clientPort serverWithLeastClients gave you) and the new token is authorized on that same Buddy -- read authorizedServer on the response: when it is set, keep your UDP session and just switch tokens; when it is null, call serverWithLeastClients for a fresh placement. Without currentServer the new token is not known to any Buddy until you call serverWithLeastClients.
refreshAppToken(
currentServer: CurrentServerInput
): AppTokenResponse!
Arguments
refreshAppToken.currentServer ● CurrentServerInput input
The Buddy this client is connected to, so the refreshed token can be authorized there. Omit for browser (UDP-proxy) clients.
Type
AppTokenResponse object
A short-lived, app-scoped gameplay token (Overworld portal). Confined to a single app: usable only against that app's Game API + Buddy realtime surface (plus read-only me and same-app refreshAppToken). It CANNOT perform management operations and CANNOT mint tokens for other apps, so a game stack that receives it never gets the player's full identity session.