Get Player Values
horizon_get_player_valuesReturns a player's server-owned balances, UTC daily counters, and operation replay window for displaying values or recovering timed-out adjustments. Use it to read player state, not modify balances.
Instructions
Returns the player's server-owned balances, UTC daily counters and operation replay window. Use when: displaying balances or recovering a timed-out horizon_adjust_player_value operation. Not for: changing balances (use horizon_adjust_player_value or horizon_purchase_player_value_offer). Requires: userId and the player's session: sign in with horizon_signin_email or horizon_signin_anonymous and pass its accessToken as sessionToken. Side effects: May lazily initialize missing configured values once; does not change existing balances. Returns: {userId, definitionVersion, revision, day, values, operationWindow: {serverTime, oldestAcceptedAt}} Errors: 409 STATE_CONFLICT: refresh state and retry the SAME operation ID and payload. OPERATION_CONFLICT: do not reuse an ID for a different action. OPERATION_EXPIRED: reconcile state/history; never silently generate another ID. INSUFFICIENT_BALANCE, MAX_BALANCE_REACHED or DAILY_LIMIT_REACHED leaves the whole operation unapplied. 401 means the session is missing or expired: sign in again and retry with the new accessToken. 403 for a session means the token belongs to another user: pass the userId that signed in. 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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Player UUID belonging to the selected project and player session | |
| sessionToken | Yes | Player accessToken from sign-in, sent only in the Authorization Bearer header |