motdotla / digitalocean

The easiest and most complete rubygem for DigitalOcean.
http://rubygems.org/gems/digitalocean
MIT License
153 stars 42 forks source link

Failed to create droplet with ssh_keys error [v2] #45

Closed shon closed 10 years ago

shon commented 10 years ago

Droplet creation fails if ssh_keys parameter is provided. Also I have verified that ssh key is correct.

Equivalent Curl command:

curl -X POST https://api.digitalocean.com/v2/droplets \
 -d "{'ssh_keys': [189024], 'image': 'ubuntu-14-04-x32', \
 'private_networking': False,\
 'region': 'nyc2', 'size': '512mb', 'backups': False,\
 'name': 'test05'}"\
  -H\ 
 "content_type:application/json" -H "authorization:Bearer xxxx" 

Error code: 422 Error message: { "id":"unprocessable_entity", "message":"You specified invalid ssh key ids for Droplet creation." }

shon commented 10 years ago

Never mind

bashilbers commented 10 years ago

So.. what was wrong? or what did you fix?

shon commented 10 years ago

Don't remember now but there was nothing wrong with rubygem and digitalocean API.