I created this basic demo to give an idea on how to make an API call. You can find it here: http://simplesafe.safeguard.safenet/ (alpha network)
First press the authorize button to get a valid token. Then you can post, get and delete a file.
I kept the code as straight forward as possible to make it easy to understand. So there is no jquery, no promises, no css and even no constants. Each function (post(), get() and remove()) are self contained so there is a lot of redundancy but it shows at a quick glance what’s needed to make the API call.
Open the dev console to see the response you get from the server.
Hope this help.