Skip to content
topspawn.

Developers

Check votes from your server's website

Your website can ask TOPSPAWN whether a player just voted for your server: TOPSPAWN answers yes or no, never giving a username or an address.

The steps

  1. Create a verification key

    In your dashboard, open your server, « Vote kit » tab, card « Verification for your server's website (CMS) ». The key (ts_verify_…) is shown once only. It is separate from the API key and only serves this check.

  2. Put the vote link on your website

    Copy the vote link from the same card: it prefills the player's username (#pseudo={player}, which Azuriom replaces with the username). Without a username, the player gets no in-game reward.

  3. Set up the check

    Your website calls GET /api/v1/vote/verify?ip=… with the header Authorization: Bearer ts_verify_…, or the POST variant (the address stays out of the URL). Keep the key on the server side: never in a web page.

  4. Reward the player

    Answer {"voted": true}: a valid vote came from this connection in the last 2 hours. Your website gives the reward and applies its own delay between two rewards.

What TOPSPAWN answers

Only yes or no. Never the username, the IP address, the time or the vote's identifier. IPv6 addresses of the same /64 count as one connection. A connection can be shared (home router, carrier): « yes » means « a vote from this connection », not necessarily from this person.

Depending on your website

Where to put the key:

  • Azuriom: automatic check coming soon. For now, Azuriom's Vote plugin accepts a TOPSPAWN vote without checking it: you can already add the vote link there, but the verification key is not used there yet. Azuriom gives the reward: do not also connect a NuVotifier plugin that rewards the same votes.
  • NamelessMC: its Vote module shows links without checking. For Minecraft Java, the in-game reward goes through NuVotifier (see the Votifier guide); a Bedrock-only server has no automatic reward.
  • Your own page: call the API from your server (PHP, Node…), never from the browser: it refuses web page calls.

Good to know

A few rules:

  • Window: within, from 1 to 120 minutes (120 by default).
  • Limits: 120 requests per minute per key, 60 per minute per address of your website and key.
  • A 503 answer means « retry later », never « did not vote ».
  • Replacing the key makes the old one unusable at once; revoking it deletes it.

Read next

Didn't find it?

Write to us: we will answer within 48 hours.