Developer docs
Build on VoteRank. Rewards, live counts and embeds.
Reward players the moment they vote, show real player counts on your listing, and put your rank on your own site. Plain REST and JSON — works from a Minecraft plugin, an RSPS written in Java, or a PHP page.
- API
- https://api.voterank.net
- GraphQL
- https://api.voterank.net/graphql
- Votes from
- voterank.net
Start here
Quick start#
Pick what you want to do. Each card jumps to the full guide.
- 1Add your server and open its settings.
- 2Copy your API key and, for callbacks, your signing secret.
- 3Set a vote callback URL or Votifier details, then press Send test vote.
- 4Point players at
voterank.net/vote/your-slug?player=NAME.
API keys#
Every listing gets an API key when it is created. Send it however your code finds easiest — all three forms work:
X-Api-Key: tl_xxxxxxxxxxxxxxxxxxxxxxxx
Authorization: Bearer tl_xxxxxxxxxxxxxxxxxxxxxxxx
?key=tl_xxxxxxxxxxxxxxxxxxxxxxxxGET /api/v1/me tells you which listing a key belongs to — the first call worth making.Votes
Vote links#
Send players to your vote page. Add ?player= and the vote is tied to that name, so your server knows who to reward.
https://voterank.net/vote/your-slug
https://voterank.net/vote/your-slug?player=NotchTurn on Ask for a player name in your listing settings and the vote page asks for it when the link has none. Players can vote once every 12 or 24 hours (your choice) per IP.
Vote callbacks (HTTP)#
Set a vote callback URL (https) in your listing settings and we POST to it the moment a vote lands. Reply with any 2xx to confirm. Anything else is retried with backoff (2, 4, 8, 16, 32 min) up to six times, and every attempt shows in your dashboard’s delivery log.
POST https://your-server.example/vote-callback
Content-Type: application/json
X-VoteRank-Event: vote
X-VoteRank-Signature: sha256=5d41402abc4b2a76b9719d911017c592...
{
"event": "vote",
"listingId": "f55be4bf-…",
"listingSlug": "your-slug",
"voteId": "19deb7e3-…",
"player": "Notch",
"claimToken": "9Jcnr9R3…",
"country": "US",
"timestamp": "2026-11-22T14:31:01.776Z"
}- playerstring | nullThe name from ?player= or the vote form. null when the voter gave none.
- voteIdstringUnique per vote. Store it and ignore repeats — a retry can arrive twice.
- claimTokenstring | nullSet for incentive votes; the same vote is also claimable via /incentive/check.
- testtrueOnly present on test votes from your dashboard. Do not reward.
https:// URLs. Redirects are not followed for POSTs — use the final URL. Private and local addresses are refused.Verifying callbacks#
Anyone can POST to a URL. To know a vote really came from VoteRank, check the X-VoteRank-Signature header: an HMAC-SHA256 of the raw request body, keyed with your listing’s signing secret (listing settings → Votes).
<?php
// vote-callback.php — VoteRank calls this the moment a vote lands.
$secret = 'vrsec_your_secret_from_listing_settings';
$body = file_get_contents('php://input');
$sent = $_SERVER['HTTP_X_VOTERANK_SIGNATURE'] ?? '';
if (!hash_equals('sha256=' . hash_hmac('sha256', $body, $secret), $sent)) {
http_response_code(401);
exit('bad signature');
}
$vote = json_decode($body, true);
if (!empty($vote['test'])) { echo 'test ok'; exit; }
// Reward $vote['player'] here (dedupe on $vote['voteId']).
echo 'ok';Hash the body exactly as received — parsing and re-encoding the JSON changes the bytes and the signature will not match.
Votifier & NuVotifier (Minecraft)#
With Votifier set up we push each vote straight into your server, so rewards land while the player is still online. The protocol is detected from your server’s greeting. Works for Java servers and for Bedrock players joining through Geyser.
NuVotifier (v2, recommended)
Copy token from plugins/NuVotifier/config.yml into NuVotifier token, with your host and port (default 8192).
Votifier (v1)
Paste plugins/Votifier/rsa/public.key into Votifier public key. The PEM header lines are optional.
Votes arrive under the service name voterank.net — use that in reward plugins such as VotingPlugin or SuperbVote. Only votes with a player name are sent, since Votifier needs someone to reward.
- Connection refusedVotifier is not listening on that port. Check the port in its config and your firewall.
- Timed outThe port is blocked or the host is wrong. Hosts often need the port opened in their panel.
- Public key is not validPaste the whole rsa/public.key file content.
- Signature is not validThe NuVotifier token does not match config.yml (copy it again, no spaces).
- Speaks v2 but no tokenYour server runs NuVotifier — add the token, or paste the v1 key instead.
Checking a vote (pull)#
No public web server? Have your game ask us instead, e.g. when a player types ::claimvote. By default this collects the reward in the same atomic step, so a crash halfway cannot pay twice. Add &peek=true to look without collecting.
curl "https://api.voterank.net/api/v1/incentive/check?player=Notch" \
-H "X-Api-Key: tl_your_key"{
"success": true,
"listing": "your-slug",
"voted": true,
"claimed": true,
"player": "Notch",
"votedAt": "2026-11-22T14:31:01.776Z"
}{
"success": true,
"voted": false,
"claimed": false,
"player": "Notch",
"votedAt": null
}Vote cooldown#
Show “vote again in 4h” in game. Cooldown is per voter IP, so forward the player’s address — your server’s own IP is not theirs.
GET https://api.voterank.net/api/v1/vote/status?ip=203.0.113.9
X-Api-Key: tl_your_key
{
"success": true,
"canVote": false,
"secondsRemaining": 20411,
"nextVoteAt": "2026-11-22T20:11:00.000Z",
"ipProvided": true
}Send a test vote#
Press Send test vote in your listing settings. We fire every channel you configured — Votifier (v1 or v2) and your HTTP callback — with a test player and tell you exactly what happened. Test votes carry "test": true, never count toward your rank, and appear in your delivery log.
NuVotifier v2: vote for "Notch" delivered to play.example.com:8192.
HTTP callback: 200 OK from example.com.Scripting it? It is the sendTestVote(listingId, playerName) GraphQL mutation, available to the listing owner (5 per minute).
Live player counts
Supported games#
We poll every few minutes and show the result on your listing and in the toplist. Enter these in your listing’s Live stats settings, then press Run test.
- Minecraft JavaHost, e.g. play.example.com (SRV records work) or host:portServer List Ping — players, version, MOTD, icon
- Minecraft BedrockHost and port 19132, edition BedrockRakNet ping over UDP
- Java + GeyserHost, edition BothJava first, Bedrock if Java is down
- Rust · CS2 · GMod · ARKHost and query port (often 27015)Steam A2S query (bots excluded)
- FiveM · RedMcfx.re/join code, or host:30120Cfx.re server list or the server's own JSON
- TibiaWorld name — or OT host:7171 — or a status URLTibiaData, or the OTS status protocol
- Steam gamesSteam app idConcurrent players from Steam
- DiscordA never-expiring invite linkMembers online / total members
- Twitch · Kick · YouTubeChannel name (YouTube: channel id)Live viewers
- RSPS · Metin2 · anything elseA status endpoint URLYour JSON — see below
Status endpoint (RSPS & custom servers)#
RuneScape private servers, Metin2, emulators — games with no standard query protocol — can still show live counts. Serve a tiny JSON document, choose Status endpoint in Live stats and paste its URL.
GET https://your-site.example/status.json
{ "online": 412, "max": 1000 }- onlinenumberRequired. Players online right now.
- maxnumberOptional. Slots or player cap — shown as 412 / 1000.
- versionstringOptional. Revision or version, e.g. "Revision 317".
- motdstringOptional. A one-line message.
Copy-paste starters — swap the counting line for however your server knows:
<?php
// status.php — put it on your website, paste its URL into your listing.
header('Content-Type: application/json');
header('Cache-Control: max-age=60');
// However your server stores it: a DB row, a file the server writes, …
$pdo = new PDO('mysql:host=localhost;dbname=game', 'user', 'pass');
$online = (int) $pdo->query('SELECT COUNT(*) FROM players WHERE online = 1')->fetchColumn();
echo json_encode(['online' => $online, 'max' => 2000]);Check your format
Online
412 / 1,000
players online
- Version
- Revision 317
- MOTD
- Double XP weekend
Also understood: {"players":{"online":412,"max":1000}}, {"players":412,"maxPlayers":1000}, playersOnline/playersMax, a data wrapper, {"status":"offline"}, and plain text like 412 or 412/1000. Respond within 5 seconds and under 64 KB, over public http(s).
Pushing your count#
Server behind NAT or no web server at all? Push the number to us instead, signed with your API key. Same weight as a count we polled.
POST https://api.voterank.net/api/v1/players
Authorization: Bearer tl_your_key
Content-Type: application/json
{ "players": 412, "max": 1000, "version": "Revision 317" }Only players is required. The reply says when to report next (every five minutes); more than 4 a minute returns 429. A count that stops arriving ages out, so a crashed script never leaves a stale number on your page.
Discord member counts#
Discord server listings show members online and total members, read from your invite link — nothing to install. Use a never-expiring invite (Server Settings → Invites → Expire after: Never) as your listing’s Discord link.
The invite can also be pasted as the status endpoint URL of any listing. If Discord ever refuses the invite, enabling Server Widget in your Discord settings gives us a fallback for the online count.
Embeds & data
Banners & vote buttons#
Every listing has a live banner for forum signatures and a small vote button for your site or README. Both are SVGs whose numbers update themselves — paste once.
<a href="https://voterank.net/vote/YOUR-SLUG">
<img src="https://api.voterank.net/api/listings/YOUR-SLUG/button.svg?theme=dark"
alt="Vote for us on VoteRank" width="160" height="40">
</a>- themedark · light · midnight · forest · emberColour scheme.
- sizelarge · compactSignature only: 500×100 or 350×70.
- address0Hide your IP:port on the banner.
- stylevote · viewButton only: “Vote” or “View on VoteRank”.
The builder at /signature/your-slug previews every combination and gives you the code. Embeds are not counted as listing views.
Public read API#
No key needed — show your votes and players on your own site.
GET https://api.voterank.net/api/v1/listing/your-slug
{
"success": true,
"listing": {
"slug": "your-slug",
"name": "Your Server",
"votesMonth": 1842,
"votesTotal": 7368,
"playersOnline": 412,
"playersMax": 1000,
"isOnline": true,
"isPremium": false,
"rating": 4.6,
"voteUrl": "https://voterank.net/vote/your-slug"
}
}Call it from your server, not the browser: cross-origin browser requests are not allowed. Responses are fine to cache for a minute or two.
GraphQL#
Everything the website uses is available at https://api.voterank.net/graphql. The REST endpoints above exist because plugins are happier with query strings.
query {
listing(slug: "your-slug") {
name
rank
votesMonth
playersOnline
playersMax
isOnline
}
}Errors & limits#
Errors are JSON with an HTTP status that means what it says:
{
"success": false,
"error": "Invalid or revoked API key",
"code": "UNAUTHENTICATED"
}- /api/v1/* (per key)120 requests a minute
- POST /api/v1/players4 reports a minute
- Send test vote5 a minute per listing
- Status endpoint & server pollsEvery ~5 minutes, 5 second timeout
Questions or something missing? Contact us — pick “API” as the topic.