API OVPN enable disable

Hello, i‘m interested to implement a button to enable or disable the ovpn client.

I thought the url is: …/api/ovpn/client/set

But it always tells me: code -5
Msg enablevpn missing. Is this the wrong code? Is it the same Code for enable and disable?

Thanks

For GL routers with a built-in switch button, there is a GUI option More Settings > Button Settings to use it as the on/off switch for either OpenVPN or WireGuard clients.
GL-inet doc link (for mini routers)

I have not used the /ovpn/client/set webAPI myself, but -5 indicates it’s missing one or both required parameters.
GL-inet API doc link

1 Like