The Hopzone API provides access to read server info and server vote data, create
server vote url for players with IPv6 for games that do not use IPv6 (like lineage 2)
To maintain compatibility between IPv4 and IPv6 internet providers who use v4-v6 Tunnels to operate on the IPv6 internet, making it impossible for hopzone to see the same IP as the Lineage2 server and then compare whether the person voted or not.
To solve the issue this API has new logic functions an extra field in the voting URL called vote_id created by a vote request that generates a new vote with status "pending", next the vote link is generated and the player is sent to vote from your side in that link, on a successful vote the status from "pending" will be "completed" along with other information you can see bellow on this page.
With the vote id you can check if the player has voted by checking the vote status is "completed" instead of the IP Address, and deliver a reward for this user.
The Hopzone API is used with POST or GET request methods.
To use this API, you need an API key. Add a server to get your own API key.
GET request method
Retrieve vote info with player's IP Address
# Here is a curl example
# replace {API-KEY} with your api key
# replace {PLAYER-IP} with your player's IP Address
curl -X GET "https://api.hopzone.eu/v1/?api_key={API-KEY}&ip={PLAYER-IP}&type=json"
# Note you can run the command here: https://reqbin.com/curl
To retrieve the vote info you need to make a GET request to the following endpoint: https://api.hopzone.eu/v1/
An alphanumeric string value preferably player's IP Address.
type
String
3-4
Output print values: json|xml Default: json
RESULT PARAMETERS
Field
Type
Length
Description
error
String
2 or 4
Will return "OK" or "IXXX" error code.
vote_time
Integer
10
number of seconds since the Unix Epoch
server_time
Integer
10
number of seconds since the Unix Epoch
api_version
String
1
Will return the API version.
vote_id
Integer
1-11
number of unique vote id
server_id
Integer
1-11
number of unique server id
user_id
Integer
1-11
number of unique user id who voted
hours_since_vote
Integer
1-2
number of unique user id who voted
status
String
7-9
Will return "completed" or "pending".
vote_ip
Array
2
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {PLAYER-IP} with the player's IP Address ie: $player_ip = "21.41.51.61"; // you should retrieve player's IP from database
// replace {API-KEY} with your api key // replace {PLAYER-IP} with the player's IP Address URL url =new URL("https://api.hopzone.eu/v1/?api_key={API-KEY}&ip={PLAYER-IP}&type=json"); HttpURLConnection http =(HttpURLConnection)url.openConnection(); System.out.println(http.getResponseCode()+" "+ http.getResponseMessage());
http.disconnect();
// replace {API-KEY} with your api key // replace {PLAYER-IP} with the player's IP Address const url ='https://api.hopzone.eu/v1/?api_key={API-KEY}&ip={PLAYER-IP}&type=json';
const response =await fetch(url);
const text =await response.text();
console.log(text);
// replace {API-KEY} with your api key // replace {PLAYER-IP} with the player's IP Address var url ="https://api.hopzone.eu/v1/?api_key={API-KEY}&ip={PLAYER-IP}&type=json";
var httpRequest =(HttpWebRequest)WebRequest.Create(url);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
POST request method
Retrieve vote info with player's IP Address
# Here is a curl example
# replace {API-KEY} with your api key
# replace {PLAYER-IP} with your player's IP Address
curl \
-X POST https://api.hopzone.eu/v1/ \
-d 'api_key={API-KEY}' \
-d 'ip={PLAYER-IP}' \
-d 'type=json'
# Note you can run the command here: https://reqbin.com/curl
To retrieve the vote info you need to make a POST request to the following endpoint: https://api.hopzone.eu/v1/
An alphanumeric string value preferably player's IP Address.
type
String
3-4
Output print values: json|xml Default: json
RESULT PARAMETERS
Field
Type
Length
Description
error
String
2 or 4
Will return "OK" or "IXXX" error code.
vote_time
Integer
10
number of seconds since the Unix Epoch
server_time
Integer
10
number of seconds since the Unix Epoch
api_version
String
1
Will return the API version.
vote_id
Integer
1-11
number of unique vote id
server_id
Integer
1-11
number of unique server id
user_id
Integer
1-11
number of unique user id who voted
hours_since_vote
Integer
1-2
number of unique user id who voted
status
String
7-9
Will return "completed" or "pending".
vote_ip
Array
2
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {PLAYER-IP} with the player's IP Address ie: $player_ip = "21.41.51.61"; // you should retrieve player's IP from database
// replace {API-KEY} with your api key // replace {PLAYER-IP} with the player's IP Address URL url =new URL("https://api.hopzone.eu/v1/"); HttpURLConnection http =(HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
String data ="api_key={API-KEY}&ip={PLAYER-IP}&type=json";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
GET request method
Retrieve vote info with vote id
# Here is a curl example
# replace {API-KEY} with your api key
# replace {VOTE-ID} with your vote id Address
curl -X GET "https://api.hopzone.eu/v1/?api_key={API-KEY}&vote_id={VOTE-ID}&type=json"
# Note you can run the command here: https://reqbin.com/curl
To retrieve the vote info you need to make a GET request to the following endpoint: https://api.hopzone.eu/v1/
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {VOTE-ID} with the vote id ie: $vote_id = 3; // you can retrieve vote id from the API
// replace {API-KEY} with your api key // replace {VOTE-ID} with the vote id URL url =new URL("https://api.hopzone.eu/v1/?api_key={API-KEY}&vote_id={VOTE-ID}&type=json"); HttpURLConnection http =(HttpURLConnection)url.openConnection(); System.out.println(http.getResponseCode()+" "+ http.getResponseMessage());
http.disconnect();
// replace {API-KEY} with your api key // replace {VOTE-ID} with the vote id const url ='https://api.hopzone.eu/v1/?api_key={API-KEY}&vote_id={VOTE-ID}&type=json';
const response =await fetch(url);
const text =await response.text();
console.log(text);
// replace {API-KEY} with your api key // replace {VOTE-ID} with the vote id var url ="https://api.hopzone.eu/v1/?api_key={API-KEY}&vote_id={VOTE-ID}&type=json";
var httpRequest =(HttpWebRequest)WebRequest.Create(url);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
POST request method
Retrieve vote info with vote id
# Here is a curl example
# replace {API-KEY} with your api key
# replace {VOTE-ID} with the vote id
curl \
-X POST https://api.hopzone.eu/v1/ \
-d 'api_key={API-KEY}' \
-d 'vote_id={VOTE-ID}' \
-d 'type=json'
# Note you can run the command here: https://reqbin.com/curl
To retrieve the vote info you need to make a POST request to the following endpoint: https://api.hopzone.eu/v1/
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {VOTE-ID} with the vote id ie: $vote_id = 3; // you can retrieve the vote id from the API
// replace {API-KEY} with your api key // replace {VOTE-ID} with the vote id URL url =new URL("https://api.hopzone.eu/v1/"); HttpURLConnection http =(HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
String data ="api_key={API-KEY}&vote_id={VOTE-ID}&type=json";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
GET request method
Retrieve server info
# Here is a curl example
# replace {API-KEY} with your api key
# replace {SERVER-ID} with your server Id
curl -X GET "https://api.hopzone.eu/v1/?api_key={API-KEY}&server_id={SERVER-ID}&type=json"
# Note you can run the command here: https://reqbin.com/curl
To retrieve server info you need to make a GET request to the following endpoint: https://api.hopzone.eu/v1/
Will return an array list of votes from the current month
Field
Type
Length
Description
vote_time
Integer
10
number of seconds since the Unix Epoch
vote_id
Integer
1-11
number of unique vote id
user_id
Integer
1-11
number of unique user id who voted
hours_since_vote
Integer
1-2
number of unique user id who voted
status
String
7-9
Will return "completed" or "pending".
vote_ip
Array
2
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {SERVER-ID} with your server id ie: $server_id = 19;
$api_key ="{API-KEY}";
$server_id ="{SERVER-ID}";
// replace {API-KEY} with your api key // replace {SERVER-ID} with your server id URL url =new URL("https://api.hopzone.eu/v1/?api_key={API-KEY}&server_id={SERVER-ID}&type=json"); HttpURLConnection http =(HttpURLConnection)url.openConnection(); System.out.println(http.getResponseCode()+" "+ http.getResponseMessage());
http.disconnect();
// replace {API-KEY} with your api key // replace {SERVER-ID} with your server id const url ='https://api.hopzone.eu/v1/?api_key={API-KEY}&server_id={SERVER-ID}&type=json';
const response =await fetch(url);
const text =await response.text();
console.log(text);
// replace {API-KEY} with your api key // replace {SERVER-ID} with your server id var url ="https://api.hopzone.eu/v1/?api_key={API-KEY}&server_id={SERVER-ID}&type=json";
var httpRequest =(HttpWebRequest)WebRequest.Create(url);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
POST request method
Retrieve server info
# Here is a curl example
# replace {API-KEY} with your api key
# replace {SERVER-ID} with your server Id
curl \
-X POST https://api.hopzone.eu/v1/ \
-d 'api_key={API-KEY}' \
-d 'server_id={SERVER-ID}' \
-d 'type=json'
# Note you can run the command here: https://reqbin.com/curl
To retrieve server info you need to make a POST request to the following endpoint: https://api.hopzone.eu/v1/
Will return an array list of votes from the current month
Field
Type
Length
Description
vote_time
Integer
10
number of seconds since the Unix Epoch
vote_id
Integer
1-11
number of unique vote id
user_id
Integer
1-11
number of unique user id who voted
hours_since_vote
Integer
1-2
number of unique user id who voted
status
String
7-9
Will return "completed" or "pending".
vote_ip
Array
2
Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
forwarded_ip
Array
2
(Proxy) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
connecting_ip
Array
2
(CloudFlare) Will return an array with "type" => ["IPv4", "IPv6"] and a string of "digits" for IPv4 or an array of 8 strings "hexadecimal_digits" for IPv6 to form an example of 2001:cdba:0000:3257:9652.
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {SERVER-ID} with your server id ie: $server_id = 19;
$api_key ="{API-KEY}";
$server_id ="{SERVER-ID}";
// replace {API-KEY} with your api key // replace {SERVER-ID} with your server id URL url =new URL("https://api.hopzone.eu/v1/"); HttpURLConnection http =(HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
String data ="api_key={API-KEY}&server_id={SERVER-ID}&type=json";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
GET request method
Create vote link with server id
# Here is a curl example
# replace {API-KEY} with your api key
# replace {SERVER-ID} with your server id
curl -X GET "https://api.hopzone.eu/v1/?api_key={API-KEY}&generate={SERVER-ID}&type=json"
# Note you can run the command here: https://reqbin.com/curl
To create a vote link you need to make a GET request to the following endpoint: https://api.hopzone.eu/v1/
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {SERVER-ID} with the server id ie: $server_id = 19;
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id
URL url =new URL("https://api.hopzone.eu/v1/?api_key={API-KEY}&generate={SERVER-ID}&type=json"); HttpURLConnection http =(HttpURLConnection)url.openConnection(); System.out.println(http.getResponseCode()+" "+ http.getResponseMessage());
http.disconnect();
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id const url ='https://api.hopzone.eu/v1/?api_key={API-KEY}&generate={SERVER-ID}&type=json'; const response =await fetch(url); const text =await response.text();
console.log(text);
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id
var url ="https://api.hopzone.eu/v1/?api_key={API-KEY}&generate={SERVER-ID}&type=json";
var httpRequest =(HttpWebRequest)WebRequest.Create(url);
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); } Console.WriteLine(httpResponse.StatusCode);
POST request method
Create vote link with server id
# Here is a curl example
# replace {API-KEY} with your api key
# replace {SERVER-ID} with your server id
curl \
-X POST https://api.hopzone.eu/v1/ \
-d 'api_key={API-KEY}' \
-d 'generate={SERVER-ID}' \
-d 'type=json'
# Note you can run the command here: https://reqbin.com/curl
To create a vote link you need to make a POST request to the following endpoint: https://api.hopzone.eu/v1/
<?php // replace {API-KEY} with your api key ie: $api_key = "a8htap4a4uoga43hrah"; // replace {SERVER-ID} with the server id ie: $server_id = 19;
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id URL url =new URL("https://api.hopzone.eu/v1/"); HttpURLConnection http =(HttpURLConnection)url.openConnection();
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); String data ="api_key={API-KEY}&generate={SERVER-ID}&type=json";
byte[] out = data.getBytes(StandardCharsets.UTF_8);
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id const url ='https://api.hopzone.eu/v1/'; const data ="api_key={API-KEY}&generate={SERVER-ID}&type=json"; const response =await fetch(url,{
method:'POST',
headers:{ 'Content-Type':'application/x-www-form-urlencoded', },
body: data, }); const text =await response.text();
console.log(text);
// replace {API-KEY} with your api key // replace {SERVER-ID} with the server id var url ="https://api.hopzone.eu/v1/";
var httpRequest =(HttpWebRequest)WebRequest.Create(url);
httpRequest.Method="POST";
var httpResponse =(HttpWebResponse)httpRequest.GetResponse(); using(var streamReader =newStreamReader(httpResponse.GetResponseStream())) {
var result = streamReader.ReadToEnd(); }
Console.WriteLine(httpResponse.StatusCode);
Errors
The Hopzone API uses the following error codes:
Error Code
Description
M000
Parameters are missing. This error appears when a mandatory parameter is missing.
M001
Too many parameters given. This error appears when too many parameters added in the request.
A002
Missing api_key. This error appears if the API key is missing.
A003
Wrong length for api_key. This error appears if the API key length is not 25 characters.
A004
Illegal characters found on api_key. This error appears if you use an invalid character other than a-Z and 0-9.
N005
Missing name. This error appears if the name parameter is missing.
N006
Wrong length for name. This error appears if the name parameter has less than 3 or more than 25 characters.
N007
Illegal characters found on name. This error appears if you use an invalid character other than a-Z and 0-9.
I008
Missing IP Address. This error appears if the IP Address parameter is missing.
I009
Invalid IP Address. This error appears if the IP Address parameter is not an IPv4 or IPv6 format.
I010
Wrong length for IP Address. This error appears if the IP Address parameter has less than 7 or more than 45 characters.
I011
Invalid IP Address. This error appears if you use an reserved range IP Address.
G012
Invalid generate. This error appears if the generate parameter is not a valid integer.
G014
Missing generate. This error appears if the generate parameter is missing.
G015
Wrong length for generate. This error appears if the generate parameter has less than 1 or more than 25 characters.
V016
Invalid vote_id. This error appears if the vote_id parameter is not a valid integer.
V017
Missing vote_id. This error appears if the vote_id parameter is missing.
V018
Wrong length for vote_id. This error appears if the vote_id parameter has less than 1 or more than 19 characters.
S019
Invalid server_id. This error appears if the server_id parameter is not a valid integer.
S020
Missing server_id. This error appears if the server_id parameter is missing.
S021
Wrong length for server_id. This error appears if the server_id parameter has less than 1 or more than 19 characters.
X666
if you see this error call GOD.
Important Information
Privacy Notice: We utilize cookies to optimize your browsing experience and analyze website traffic. By consenting, you acknowledge and agree to our Cookie Policy, ensuring your privacy preferences are respected.