Skip to content
Back to home
REST API v1

Vote API Documentation

Integrate the voting system into your game server. Check player votes, get character name, game world, IP address and automatically distribute rewards.

Base URL https://mmoprime.com/api/v1

Authentication

🔑 Server Token

Generate a token in your project dashboard: My Servers → Edit. Pass it as the server_token.

Endpoints

Universal endpoint. If character — checks whether the character voted in the last 24 hours. Otherwise it returns a paginated list.

Query Parameters
Parameter Type Description
server_token string required Your server token
character string optional Character name — checks specific vote
world string optional Game world / realm name. Works in both modes: in the listing it keeps only that realm’s votes.
period string optional today yesterday week month all
page integer optional Default: 1
per_page integer optional Max 100. Default: 50
Response — vote found (character mode)
JSON
{
    "success": true,
    "voted_at": "2025-07-20T15:30:00+03:00",
    "character": "Arthas",
    "server_world": "Lordaeron",
    "server_id": 123
}
Response — vote not found
JSON
{
    "success": false,
    "message": "No vote found for this character"
}
Response — list mode
JSON
{
    "success": true,
    "data": [
        {
            "id": 1,
            "character_name": "Arthas",
            "server_world": "Lordaeron",
            "server_name": "WoW Classic x5",
            "ip_address": "192.168.1.10",
            "voted_at": "2025-07-20 15:30:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 5,
        "per_page": 50,
        "total": 243,
        "server_info": {
            "id": 123,
            "name": "WoW Classic x5",
            "game": "World of Warcraft"
        }
    }
}

Vote Object Fields

FieldTypeDescription
idintegerUnique vote ID
character_namestringCharacter name
server_worldstring|nullGame world / realm
server_namestringServer name
ip_addressstringVoter IP address
voted_atstringVote timestamp, Moscow time (UTC+3)

Integration Examples

Check character vote — PHP
$token = 'your_server_token';
$character = 'Arthas';
$world = 'Lordaeron'; // optional

$url = "https://mmoprime.com/api/v1/votes/by-token?"
    . http_build_query([
        'server_token' => $token,
        'character'    => $character,
        'world'        => $world,
    ]);

$data = json_decode(file_get_contents($url), true);

if ($data['success']) {
    $votedAt   = $data['voted_at'];
    $world     = $data['server_world'];
    // Grant reward
}
Check character vote — JavaScript
const checkVote = async (token, character, world = null) => {
    const params = new URLSearchParams({
        server_token: token,
        character: character,
    });
    if (world) params.set('world', world);

    const res = await fetch(
        `https://mmoprime.com/api/v1/votes/by-token?${params}`
    );
    const data = await res.json();

    if (data.success) {
        console.log('World:', data.server_world);
        // Grant reward
    }
};
Check character vote — Laravel
use Illuminate\Support\Facades\Http;

public function checkVote(string $character, ?string $world = null): bool
{
    $params = [
        'server_token' => config('services.mmovibe.token'),
        'character'    => $character,
    ];
    if ($world) $params['world'] = $world;

    $response = Http::get(
        'https://mmoprime.com/api/v1/votes/by-token',
        $params
    );

    if ($response->successful() && $response->json('success')) {
        // $response->json('server_world')
        // Grant reward
        return true;
    }
    return false;
}

Automated Rewards

⚡ Recommended Workflow
  1. 1Create a cron job that runs every 5-15 minutes
  2. 2Request today's votes via the API
  3. 3Compare with your local database of processed votes
  4. 4Grant rewards for new votes and save the record

Monthly Vote Reset

Important: All votes are automatically cleared on the 1st of every month at 00:00 Moscow time. Counters reset to zero. Process all outstanding votes before the end of each month.

Integration Tips

  • Do not poll the API more than once a minute. The hard limit is 120 requests a minute; past that you get a 429.
  • Store reward history to avoid double-granting
  • Handle network errors and API downtime gracefully
  • Always use HTTPS
  • server_world is optional — use it if your server has multiple realms