API Returning Error

I set up an OpenVPN server on my Ubuntu 18.10 VPS, which is working perfectly. In an attempt to lower the cost, I’m trying to set up scripts that run when my PC is booted and when it’s logged out of that turn on and off the VPS respectively, since I won’t be using it when my PC is off. I created a basic batch script to do so using cURL(which apparently is included in the Windows 10 Command Prompt) to call the DO API. I copied the example cURL request from the API docs verbatim, replacing the API token and the droplet ID, and it returned {"id":"bad_request","message":"Your request body was malformed."} To ensure that authentication was working, I typed some random nonsense as the API token, which of course returned {"id": "unauthorized", "message": "Unable to authenticate you." } I have no idea why it’s not working, any ideas?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer