WireGuardOpenVPNAPI

Generate WireGuard Configs With an API

One call returns a complete WireGuard config for any server, ready to import into the WireGuard app or embed in your own.

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, from POST /orders.
  • server_id: the location, from GET /vpn/servers.
  • protocol: wireguard (default) or openvpn.
  • 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-quick or 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.

Frequently asked questions

Yes. GET /vpn/config returns a complete WireGuard config for a VPN account and server. You do not need to run servers or create keys yourself.

No. The keys are created on our side for each account and server, and the same config comes back every time you ask for it.

Yes. Add protocol=openvpn. Use port_id=1 for UDP 1194 or port_id=2 for TCP 443 on networks that block UDP.

All 32 servers in 19 countries. GET /vpn/servers returns the list with each server’s id, city and country.

Generate your first WireGuard config

Free account, free test mode and no monthly platform fee. You only pay wholesale ($1.75 a month per VPN account) when you create one.

Launch Your White Label VPN Business Today

The global VPN market grows 15%+ every year. Launch in 5 minutes with zero upfront cost — keep 100% of your earnings.

No credit card required $0 monthly platform fee Live in 5 minutes Cancel anytime