Short answer
Call GET /vpn/config with the VPN account (service_id) and the server (server_id), and the ResellPortal API returns a complete WireGuard config: the private key, the address, DNS and the server’s public key and endpoint. You do not run any servers or manage keys yourself. Add protocol=openvpn to get an OpenVPN file instead.
The request
curl "https://panel.resellportal.com/wp-json/resellportal/v1/vpn/config?service_id=597&server_id=8" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret"service_id: the VPN account, fromPOST /orders.server_id: the location, fromGET /vpn/servers.protocol:wireguard(default) oropenvpn.port_id: OpenVPN only. 1 = UDP 1194, 2 = TCP 443 for networks that block UDP.
The response
{
"success": true,
"protocol": "wireguard",
"filename": "vpn-server-8.conf",
"config": "[Interface]\nPrivateKey = ...\nAddress = 10.66.1.2/32\nDNS = 1.1.1.1, 9.9.9.9\nMTU = 1420\n\n[Peer]\nPublicKey = ...\nAllowedIPs = 0.0.0.0/0, ::/0\nEndpoint = 45.61.55.40:51820\nPersistentKeepalive = 25\n"
}Save config as a .conf file and import it into any WireGuard app, or pass it straight to the WireGuard library inside your own app. Asking again for the same account and server returns the same config, so you can fetch it whenever you need it.
Using the config in your own app
- Android: the official WireGuard tunnel library for Android.
- iPhone and Mac: WireGuardKit inside a Network Extension.
- Windows: the embeddable WireGuard tunnel service.
- Linux and routers:
wg-quickor the router’s WireGuard screen.
Every config counts as one of the 10 devices a login can use at the same time.
OpenVPN when WireGuard is blocked
Some networks block WireGuard and other UDP traffic. For those, ask for protocol=openvpn&port_id=2: the OpenVPN file then connects over TCP 443, the same port as normal secure websites. The response also includes the username and password the OpenVPN file signs in with.