VPN Script comes with API so you can create and integrate with your own applications. You have to use your VPN Script installation link as the base URL for the endpoints.
When a configuration status is "1" that means it was created on the server and it will set "config" data to connect WireGuard.
{"success": false,"message": "Unauthenticated."}
{"success": false,"message": "You do not have any service."}
{"success": false,"message": "Your service is not active."}
{"success": false,"message": "Your service is expired."}
{"success": false,"message": "The server is not using WireGuard protocol."}
{"success": false,"message": "The server is not found or enabled."}
{"success": false,"message": "No configuration found for this server."}
WireGuard Configuration
POST/api/wireguard/create
Create a new WireGuard configuration on specific vpn server.
Headers
Request Body
{"status": true,"message": "WireGuard configuration create job dispatched. It will be completed shortly."}
{"success": false,"message": "You do not have any service."}
{"success": false,"message": "Your service is not active."}
{"success": false,"message": "Your service is expired."}
{"success": false,"message": "The server is not found or enabled."}
{"success": false,"message": "The server is not using WireGuard protocol."}
{"success": false, "message": "The server has reached the maximum allowed user limit. Please try again later or choose a different server."
}
{"success": false, "message": "Looks like you reached maximum allowed device limit on your plan. Please retry after disconnecting from OpenVPN or deleting WireGuard configurations that you have generated before."
}
{"success": false,"message": "Unauthenticated."}
WireGuard Configuration
DELETE/api/wireguard/delete
Delete a specific WireGuard configuration.
Headers
Request Body
{"success": true,"message": "WireGuard configuration delete job dispatched. It will be completed shortly."}
{"success": false,"message": "Unauthenticated."}
{"success": false,"message": "The WireGuard configuration is not found."}
{"success": false,"message": "The WireGuard configuration is pending creation or deletion."}
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Accept
application/json
username*
String
Alphanumeric username of the client
password*
String
Password of the client
device_name*
String
The device name the user tries to authenticate from. (Ex: Liam's iPhone)
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
paginate
Integer
The results with be paginated by set amount.
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
server_id*
Integer
The server id that you want to retrieve OpenVPN profile data.
cert_only
Boolean
If you wish to retrieve only the ca.crt content instead of whole profile data, you can send this as True. By default it's False.
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
server_id*
Integer
The server id that you want to create a new WireGuard configuration for user.
Authorization*
String
Bearer Authorization-Token-Here
Accept*
String
application/json
config_id*
Integer
Pass the WireGuard configuration id you would like to delete.