How do I get an API and client id key for using the API?

November 18, 2013 11.6k views
I have been unable to find docs on how to get appropriate keys for the API. Where do I find those?
7 Answers

I can't seem to find the Client ID ANYWHERE even though I've used the tut above.... Anyone????

Hello moderators --

"ClientID" is only documented on the V1 API page, and API1 is deprecated.

I realize that V2 API just left beta (congrats), but I am using V2 API and have never use the now-deprecated V1 API.

Very important: API v2 docs suggests there is NO NEED for "ClientID", since there's no mention of it in v2 page. (Note the millisami's astute observation: "sucks").

I will assume "no" need for this variable in v2, and if that assumption turns out wrong I'm sure I will recognize the problem. :-)

At the very least an updated answer should be added here, and perhaps a clarification on the V2 API stating which settings are needed in V2.

  • Hey! You are correct, there is no need for the "ClientID" with APIv2. You only need the OAuth token instead of the ID/Key pair.

Yes, thanks for confirming. Please note that the API docs for DO are -not- correct. This means other DO users will needlessly have difficulty, unless someone can get word to the DO engineers. The API docs need review and correction.

I'm going through the API docs now, and I found a second, different bug in the API docs: The API field "sshkeys" is renamed in v2 API to "sshkey_ids". This is a known issue from like October 2014, and hasn't been documented: https://github.com/sckott/analogsea/issues/23

(I have to complain about the docs not being correct... I've wasted hours on these two errors, and I haven't actually got too far into the DO API yet so I expect lots more problems now. My goal is to automate droplet provisioning using scripts, so it's not like I can ignore the API v2 documentation errors and switch back to the DO web portal. That wouldn't be automation.

While I prefer to support DO, my time matters... and I may be forced to switch back to Amazon EC2. Through past experience I already know EC2 documentation is up to date and correct.

Have another answer? Share your knowledge.