Question
API: Reset Password on Droplet fails with "Unable to authenticate you."
These commands create a droplet successfully
$ export TOKEN="faa02e8485a1536a8ff770a4db2bd6f690d5ea88da66blahbla"
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"name":"git","region":"nyc3","size":"512mb","image":"ubuntu-14-04-x64","ssh_keys":null,"backups":false,"ipv6":true,"user_data":null,"private_networking":null}' "https://api.digitalocean.com/v2/droplets"
The returned droplet is (for example) number 5490611. We know then that $TOKEN is my correct API key. So then I try to reset the password:
curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer $TOKEN' -d '{"type":"password_reset"}' "https://api.digitalocean.com/v2/droplets/5490611/actions"
However, I get this error returned: {“id”:“unauthorized”,“message”:“Unable to authenticate you.”}
Why is my password reset failing?
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.
×