2024 Metin2 private servers
Advertising Campaign

Documentation

English

Vote IP

The player votes on our platform and you can thus reward him at the end of this vote. For this, your player must go to your website to trigger the call to our API. The response from our API is a JSON array.
  • Allows you to verify a vote using an IP address
  • API compatible with IPv4 and IPv6 protocol

Voting URL

You must define within your website, a voting link for your player. This link must imperatively contain the ID of your game server.
  • Example : https://metin2.top/in/game-id-game-seo-name/

API

Route https://metin2.top/api/verify/key/ip/

Settings

Field Type Description
key string Secret key to your game server
ip string IP address of your player

Responses

Status Header Response Data
true 200 Player has voted - Verified vote Date and time of the vote in datetime format
false 101 IP address is invalid NULL
false 102 IP address or ASN is not safe NULL
false 103 API Key does not exist NULL
false 104 Wrong API Called NULL
false 105 Game server banned NULL
false 106 Game server disabled NULL
false 107 Vote has already been verified by our API Date and time of the vote verification in datetime format
false 108 Player vote does not exist NULL
Our API has two main statuses:
  • Bool (true) ⇒ The vote has been verified, you can reward your player
  • Bool (false) ⇒ An error occurred while checking the vote
If your player voted, you can reward him, otherwise the response variable contains the possible error message. Our API contains other variables that allow you to target anomalies and the reasons why our API is declining a request.

Example

HTTP/1.1 200 OK
{
    'status'   => true,
    'header'   => 200,
    'response' => "Player has voted - Verified vote"
    'data'     => "31-12-9999 23:59:59"
}

PHP Example

You need to install our API script on one of your pages on your website. It must be installed on a secure area, that is to say, a page where your player must be connected to your website to consult and access said page. Our API allows you to reward your player for having voted for your game server within our platform, for this you must adapt and add the script of your reward.
<?php

    $key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
    // Secret key of your game server

    $ip = isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER['REMOTE_ADDR'];
    // Get your player's IP address

    $api = "https://metin2.top/api/verify/{$key}/{$ip}/";
    // Route

    $response = @file_get_contents($api);
    // API Call

    $vote = json_decode($response);
    // Response decoding

    if ($vote->status){

        // Vote OK
        // You can donate virtual currencies
    } else {

        // [OR] The vote has already been verified
        // [OR] No votes were found
        // [OR] An error has occurred
    }
?>
Top Metin2