Postback & Voting API
Automatically reward your players when they vote for your server.
How It Works
When a player votes for your server on RealmRanking, our system sends an HTTP GET or POST request to a URL you configure. Your server receives this request and can reward the player in-game automatically.
- 1Player votes for your server on RealmRanking
- 2RealmRanking sends a Postback request to your configured URL
- 3Your server validates the request and rewards the player
Setting Up Your Postback URL
Go to your server dashboard → Voting API settings → enter your Postback URL. The URL must be publicly accessible from the internet.
Example URL format
https://yourserver.com/vote?user={username}&id={server_id}&ip={ip}Postback Parameters
The following variables are sent with each Postback request:
{username}The in-game name the player entered when voting{server_id}Your unique RealmRanking server ID{timestamp}Unix timestamp of when the vote was cast{ip}The voter's IP address for validation
Example Implementation
A simple example of how to receive and process a Postback request:
<?php
$username = $_GET['username'];
$server_id = $_GET['server_id'];
// Reward the player in your game database
// Example: give 100 vote coins to $username
?>app.get('/vote', (req, res) => {
const { username, server_id } = req.query;
// Reward the player
res.sendStatus(200);
});Testing Your Postback
Use the Test Postback button in your server dashboard to send a simulated vote to your URL and verify it works correctly.
Retry Policy
If your server is offline or the URL returns an error, RealmRanking will retry the Postback up to 3 times over 24 hours. Failed attempts are logged in your dashboard.