How to use the API?
The app is terrible and won't even open. The unofficial app just says error and I don't know enough about programming and web design to use any CLI tools yet. Anyone have help?
Posted Apr 14, 2016, 8:19 PM UTC
25
The app is terrible and won't even open. The unofficial app just says error and I don't know enough about programming and web design to use any CLI tools yet. Anyone have help?
Posted Apr 14, 2016, 8:19 PM UTC
What are you trying to accomplish? If you're trying to setup some commands to run on demand or something I can help with that.
However, your post talks about trying to use mobile apps. Which I have no experience with.
Yeah my issue was with the apps. Though for fun I asked if they'll get windows 10? ticket said NO, BUT feel free to upgrade yourself.
Opened a ticket since I needed vmware tools after they told me to upgrade. I found the link but for fun asked if they could link the official copy. Same guy from ticket 1 got mad that I didn't wait for their "official" template lol and said they don't have a link for vmware tools
ive tried two different IP's at separate times (home and a shell elsewheres) and ive tried resetting the API key still cant get this to work with the appropriate key and email
curl https://panel.cloudatcost.com/api/v1/listtemplates.php?key=KEY&[email protected]
gives me
{"status":"error","time":1461201039,"error":103,"error_description":"invalid user login"}
should key and login be in any quotes or anything?
I checked out what you said you were trying. It failed for me too if I did a standard curl call with the url. Here's what I did to get it to work...
First the prep work:
Make sure your key status is set to enable
Verify you have the correct IP's in the whitelist on the panel settings. You can add multiple IP's if you seperate them with comma's. ^((They must be the external IP's not any 192.168's)^)
Then the command is in the following format:
The arguments we are using are:
-G: Must be capitol, tells curl to send a GET request instead of POST when using --data Note: If the API page you are requesting requires POST then disregard this argument.
-k: Allows insecure SSL connections since the API requests are through https with what appears to be an invalid certificate
--data: The API parameters
--url: The request URL, ending with .php. No ? required.
An example:
I probably simplified this too much for you, but with such a generic topic title as "How to use the API", I figured I could future proof this for any users who search that term on this subreddit and stumble upon this thread.
I think it might be as simple as the quotes you are using.
their examples dont show the quotes but you do..
ill try that later.
thanks.