Get Support

WorldVPN Reseller API

With WorldVPN API you can Create and Manage VPN Accounts with Your Own Application.
We listed below sample PHP code to find how setup it!

Create VPN Account

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “addaccount”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password
$postfields[“vpn_username”] = “username”; //Your vpn username
$postfields[“vpn_password”] = “password”; //Your vpn password
$postfields[“period”] = “1”;// One Month

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Renew VPN Account

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “renewaccount”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password
$postfields[“vpn_username”] = “username”; //Your vpn username
$postfields[“period”] = “1”;// One Month

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Delete VPN Account

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “deleteaccount”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password
$postfields[“vpn_username”] = “username”; //Your vpn username

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Get VPN Servers

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “getservers”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Get Free VPN Trial

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “gettrial”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Get VPN Usage

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “getusage”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);

Reseller Available Credit

$url=’https://www.worldvpn.net/api/api.v2.php’; //API URL

$postfields[“action”] = “getcredit”; // Method
$postfields[“reseller_username”] = “demo”; // Your reseller ID
$postfields[“reseller_password”] = “demo”; // Your reseller password

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
curl_close($ch);