Rotate Player Session
horizon_refresh_sessionRotates an opted-in player refresh token once, issuing a new access token and refresh token pair for long sessions. Use it for a single refresh per token family; store the returned pair atomically.
Instructions
Rotates one opted-in player refresh token once, replacing both access and refresh credentials. Use when: a player opted into a long session and its client needs a new access token, with only one refresh in flight per token family. Not for: access-only sessions (use horizon_signin_*), concurrent refreshes, periodic auth polling or replay after a timeout/lost response. Read horizon://docs/auth first. Requires: the latest refreshToken in platform secure storage and the same project API key as its issuing signin. Never put the token in logs, analytics, crash reports or general preferences. Side effects: consumes the token and invalidates its old access token. Reuse revokes the entire family. Atomically store the returned pair before any later refresh. This tool performs one request and never retries. Returns: {accessToken, refreshToken, accessTokenExpiresAt, refreshTokenExpiresAt, tokenType: Bearer}; access has a one-hour sliding lifetime and the new refresh token expires 30 days after rotation. Errors: REFRESH_TOKEN_INVALID/EXPIRED/REVOKED/REUSED, REFRESH_TOKEN_SCOPE_MISMATCH and REFRESH_USER_INVALID are surfaced with HTTP status. On REUSED clear local family credentials and sign in again. After an uncertain response never resubmit the old token: require fresh signin. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry). For refresh, never retry a token after an uncertain response; obtain a fresh signin instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"refreshToken": "<refreshToken>"
},
"name": "horizon_refresh_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refreshToken | Yes | Latest single-use refreshToken from an explicitly opted-in signin/signup or successful rotation, never an access token (max 512 characters) |