Create a vote session
Your game server sends a private player reference. Toplands returns a short-lived session ID and vote URL.
This specification defines how the Toplands Vote API will let a game server create a player vote session, confirm completion, and grant the reward exactly once.
A secure flow from the game server to the player and back.
Your game server sends a private player reference. Toplands returns a short-lived session ID and vote URL.
Your client, launcher, website, or in-game command opens the returned URL in the player’s browser.
Toplands applies the anti-bot challenge and IP cooldown, then records the verified vote.
Your game server checks the session and claims it. A completed vote can be rewarded only once.
The recommended implementation for a launcher, website, or in-game vote command.
Send an internal player identifier from your backend. Do not send passwords, e-mail addresses, or character information that Toplands does not need.
/v1/vote-sessionscurl -X POST https://api.toplands.com/v1/vote-sessions \
-H "Authorization: Bearer YOUR_SECRET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"server_id": "srv_aden_01",
"player_reference": "account_18427",
"return_url": "https://yourserver.com/vote-complete"
}'
{
"session_id": "vs_8f2c91",
"vote_url": "https://toplands.com/vote/vs_8f2c91",
"status": "pending",
"expires_at": "2026-10-20T21:30:00Z"
}
The URL can be opened by a launcher button, your account panel, or an in-game command. The client never receives your secret API key.
// Launcher or website example
window.open(voteSession.vote_url, "_blank", "noopener,noreferrer");
An in-game .vote command can ask the game server to create the session, then send the returned URL to the player through an HTML dialog.
Poll only while the session is pending, or use a webhook when available. Stop checking after completion, expiration, or failure.
/v1/vote-sessions/{session_id}{
"session_id": "vs_8f2c91",
"status": "verified",
"vote_id": "vote_51ad7b",
"voted_at": "2026-10-20T20:42:18Z",
"next_vote_at": "2026-10-21T20:42:18Z",
"claimed": false
}
Claiming is atomic and idempotent. If two game-server threads try to claim the same vote, only one receives permission to grant the reward.
/v1/votes/{vote_id}/claim{
"claimed": true,
"vote_id": "vote_51ad7b",
"player_reference": "account_18427"
}
First claim the vote at Toplands, then persist a local reward log, and only then add the reward to the player.
The initial API surface stays intentionally small.
/v1/vote-sessionsCreate a short-lived vote session for a player.
/v1/vote-sessions/{id}Read the current session and cooldown status.
/v1/votes/{id}/claimConsume a verified vote exactly once.
These rules protect both the player and your reward economy.
Never embed a secret API key in JavaScript, a launcher executable, HTML, or the game client.
Send an internal ID or a server-generated alias instead of personally identifiable information.
A visible success page is not proof. Trust only an authenticated API response with claimed: true.
Use next_vote_at to show when the player may vote again and avoid unnecessary requests.
API keys, webhook settings, logs, and test mode will be managed from the server owner area.