Api

API

API information for vote reward.

RustServers.gg offers a simple vote reward API, this allows server owners to check if a certain player has voted on their server and if this vote has been rewarded or not. On this page we will explain how to use it.

Check if Steam user has voted within the last 12 hours:

API URL:
https://rustservers.gg/vote-api.php?action=status&key={API_KEY}&server={SERVER_ID}&steamid={STEAMID64}
Response Description
0 There was an issue with the API key, server id, steamid64 or the player has not voted in the last 12 hours.
1 Player has voted in the last 12 hours and has not claimed their reward.
2 Player has voted in the last 12 hours and has claimed their reward.

How to set vote to claimed status for a Steam user?

API URL:
https://rustservers.gg/vote-api.php?action=claim&key={API_KEY}&server={SERVER_ID}&steamid={STEAMID64}
Response Description
0 There was an issue with the API key, server id, steamid64 or the player has not voted in the last 12 hours.
1 Player has voted in the last 12 hours and vote has successfully been set to claimed (you can reward them).
2 Player has voted in the last 12 hours and has already claimed their reward (do not reward them).

Get the total amount of times a Steam user has voted for your server:

API URL:
https://rustservers.gg/vote-api.php?action=count&key={API_KEY}&server={SERVER_ID}&steamid={STEAMID64}
Response Description
Int Total amount of times the Steam user has voted for your server.

FAQ:

Where can I find the API key of my server?
You will find the API key of your server inside the edit page of your server.

Where can I find the id of my server?
Your server id is displayed on multiple locations, the easiest way to find it is to go to the edit page of your server. Other locations are between the parentheses at the end of the page title on the edit server page. You can also find the server id at the end of the URL of you server page.

Is there a vote reward Rust plugin I can use that works with RustServers.gg?

What can I do with this API?
You can use it to reward players for voting for your server.