Connect your game
When a player types your command, the game asks VoteScript what is waiting and hands it out.
Connect your game4 steps
What you need
- A server in VoteScript with at least one reward
- Access to your game server
Create an API key
Open Game server and create a key. It is shown once. Keep it on the server, never in a client, an app or a web page.
API key
gv_4d1f…9c02CopyCopy it now. We store only a hash, so it cannot be shown again.
Waiting for the first call from your game
Choose your way
Use the page of your game if there is one. It has downloads and the exact files. Everything else can call the API.
Claim
Send the player and a new ref for each command. If you get no answer, ask again with the same ref: you get the same items, never twice.
curl -X POST -H "X-Api-Key: YOUR_KEY" \ -d player=Zezima -d ref=A-NEW-UUID \ "https://votescript.voterank.net/index.php?r=api/v1/claim"
VoteScript vote = new VoteScript("https://votescript.voterank.net", "YOUR_KEY");
String ref = UUID.randomUUID().toString();
VoteScript.Claim claim = vote.claim(player.getName(), ref);
for (VoteScript.Item item : claim.items) {
player.addItem(Integer.parseInt(item.key), item.amount);
}import { VoteScript } from './votescript.mjs';
import { randomUUID } from 'node:crypto';
const vote = new VoteScript('https://votescript.voterank.net', 'YOUR_KEY');
const claim = await vote.claim('Zezima', randomUUID());import uuid
from votescript import VoteScript
vote = VoteScript("https://votescript.voterank.net", "YOUR_KEY")
claim = vote.claim("Zezima", str(uuid.uuid4())){"ok": true, "player": "Zezima", "votes": 2,
"items": [{"key": "995", "name": "Coins", "amount": 200000}]}Try it in the game
Send a test vote from a vote site in your dashboard, then type your command.
Iron Moss: ::claimvote
Thank you for voting! Rewards received for 2 votes.
API key
gv_4d1f…9c02CopyCopy it now. We store only a hash, so it cannot be shown again.
Your game has used a key
If it does not work
401
405
429
The player has nothing waiting
Where is claim-code?
Next
GuideRewards, bonuses and streaksStart with one reward per vote: an item, a day of VIP, a title, a teleport. Add a bonus and a streak when the first one works.
GuidePayout by SQL or RCONOne PHP file runs next to your game. It asks VoteScript who earned what and pays it.
GuideCommon problemsFollow one vote from the click to the game. Stop at the first step that does not look like the picture.
Give your players one place to vote
Your page is live as soon as you create your server. You can connect the rest step by step.

