Question

How can I retrieve the root password on droplet create from the API?

Posted July 15, 2013 9k views
I'm not able to spawn a VPS and tell the user the root password via the API, or just use it myself in the script. Is this going to be implemented, and how have people worked around this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
3 answers
What about this : https://www.digitalocean.com/api_access

Im no expert :(

[code]Reset Root Password
This method will reset the root password for a droplet. Please be aware that this will reboot the droplet to allow resetting the password.

Request URL:
https://api.digitalocean.com/droplets/[droplet_id]/password_reset/?client_id=[your_client_id]&api_key=[your_api_key]
Parameters
droplet_id Required, Integer, this is the id of your droplet that you want to reset password on
Sample Response
{
"status": "OK",
"event_id": 7501
}[/code]
You will have to use SSH keys if you want to do it with the API only.
Want your password has been sent to the specified email. mailA@mail.com, MailB@mail.com
Submit an Answer