Skip to main content
GET
Download VPN certificate
JavaScript only — the auto-generated sample calls res.json(), which throws a SyntaxError because this endpoint returns an OpenVPN profile (application/x-openvpn-profile), not JSON. Use res.text() instead, as shown below. The cURL, Python, PHP, Go, Java and Ruby samples handle this correctly.
For a complete walkthrough — including how to strip the leading # closedvpn-json metadata line and save the profile as a .ovpn file — see Creating a VPN Certificate.

Authorizations

Authorization
string
header
required

Personal Access Token (PAT) passed in the Authorization header (e.g., Bearer <pat>) for authenticated API requests. PATs are generated via /auth/generate-pat after authenticating through the magic link flow.

Query Parameters

org_id
string
required
Example:

"60c72b2f5f1b2c001c8e4b1a"

Response

The OpenVPN client profile. The body is not a bare .ovpn file: the first line is a # closedvpn-json comment carrying the organization's exit nodes, followed by a blank line and then the profile itself. Strip or ignore that comment line if your client does not tolerate it.

OpenVPN configuration file

Example:

"# closedvpn-json {\"vpnExitNodes\":[{\"id\":\"60c72b2f5f1b2c001c8e4b2a\",\"name\":\"Frankfurt Node\",\"location\":\"Frankfurt, Germany\",\"coordinates\":[50.1109,8.6821]}]}\n\nclient\ndev tun\nproto udp\nremote vpn-fra.closedvpn.io 1194\n<ca>\n-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----\n</ca>\n"