Trying to use the API v2 to upload a VPN Config but getting failed to find save path msg returned. Do i need to set anything before calling /upload or have i just misunderstood the implementation!
I am the one that gave the info to Leo and i can confirm that it works.
the @ is mandatory, just replace the file location for where you have your file located.
After uploading the file, you need to run the verify API.
Cheers Juan that’s working now. You mention the Verify API (I can only see Uploadcheck in the API docs!). Also it doesn’t list any parameters i need to fed in!
it is uploadcheck the API you should run after the upload.
I was fighting with the firmware API at that time that need the verify after so i messed up.
Regards,
Juan…
If you’re trying to accomplish this in C# (RestSharp specifically) it would look something like this…
var fileBytes = File.ReadAllBytes(@"C:\myprofile.ovpn");
var request = new RestRequest("ovpn/client/upload");
request.AddHeader("Authorization", _authToken);
request.AddFile("file", fileBytes, "myprofile.ovpn");
var response = _restClient.Post<BaseResponse>(request);