Get Leaderboard Reward
horizon_get_leaderboard_rewardCheck a player's rank reward status for the previous leaderboard period (none, pending, available, or claimed) before claiming the reward.
Instructions
Returns the player's rank reward of the previous scoring period of a board: none, pending, available to claim, or already claimed. Use when: a weekly or monthly period ended and the game wants to show 'you placed 3rd, claim 500 coins'; call it before horizon_claim_leaderboard_reward. Not for: crediting the reward (use horizon_claim_leaderboard_reward) or the final standings (use horizon_get_leaderboard_top with period previous). 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: None (read only). Returns: {status, period {start, end, finalAt, standingsFinal}, rank, values [{key, amount}], finalAt, claimableUntil, claimedAt}; fields that do not apply are left out. status NONE: no previous period or no rank in a reward tier. PENDING: the period ended but its standings are not final yet (see finalAt). AVAILABLE: claim it with horizon_claim_leaderboard_reward before claimableUntil. CLAIMED: already credited (claimedAt). The server alone decides rank and amounts from the final standings of the previous period; the client never sends them. An unclaimed reward expires when the following period ends. Errors: 404 for an unknown leaderboardKey: list valid keys with horizon_list_leaderboards. 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).
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": {
"leaderboardKey": "<leaderboardKey>",
"userId": "<userId>",
"sessionToken": "<sessionToken>"
},
"name": "horizon_get_leaderboard_reward"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Player user ID (UUID) from horizon_signup_* or horizon_signin_* | |
| sessionToken | Yes | accessToken from horizon_signin_email or horizon_signin_anonymous for this userId; sent as a Bearer session | |
| leaderboardKey | Yes | Board key from horizon_list_leaderboards (1 to 64 characters: a-z, 0-9, _ and -). Rewards exist only on named boards |