Hello,
I’am trying to upload my OVPN config via the api. I have this python code to do the job:
def upload_vpn_config(file_path):
url=f"https://{ip}/api/openvpn/config/ovpniot5"
headers={"Authorization": f"Bearer {token}"}
with open(file_path, 'rb') as file:
files = {"option": "config"}
files["file"]= file
response = requests.post(url, headers=headers, files=files, verify=False)
print(response.text)
I get a 200 as response and:
{"success":true,"data":{"path":"\/etc\/vuci-uploads\/cbid.openvpn.ovpniot5.configvpnclient.conf"}}
But the config never shows up in the GUI.
Any tips would be highly appreciated.
Thank you