pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
155 stars 24 forks source link

Error: The provided ssh_keys value must be an array. #102

Closed jbryer closed 9 years ago

jbryer commented 9 years ago

I have installed the latest version from Github and get this error when creating a new droplet:

d <- docklet_create() Using default ssh keys: MacBook Air SSH Error: The provided ssh_keys value must be an array.

sckott commented 9 years ago

hi @jbryer - Sorry about that error. Looks like they've changed something on their end. I'll get a fix up

sckott commented 9 years ago

yeah, they require ssh_keys to be a json array now https://developers.digitalocean.com/documentation/v2/#create-a-new-droplet - fixed, pushing soon

sckott commented 9 years ago

@jbryer reinstall, let me know if that doesn't work for you

jbryer commented 9 years ago

That did it. Thanks @sckott!

sckott commented 9 years ago

great, :rocket:

tanjilahsan commented 8 years ago

Hi, What if I have a single SSH key? I am dying to create droplet with a single SSH Key, alas I can't! Always I get this error {"id":"unprocessable_entity","message":"The provided ssh_keys value must be an array."} I tried with the following values: 'name' => 'TestDropletfromAPI2', 'region' => 'sfo1', 'size' => '512mb', 'image' => '19083981', 'ssh_keys' => [1478548], 'backups' => '1', 'ipv6' => '1', 'user_data' => null, 'private_networking' => '1', 'volumes' => null

sckott commented 8 years ago

@tanjilahsan are you using the analogsea pkg? If so, what call did you make? or are you making a curl request on the command line

tanjilahsan commented 8 years ago

@sckott thanks for your response! No, I'm using Guzzlehttp with laravel 5. My issue has been sorted out. It was my mistake of not using content-type/json and I was sending a php array of form-params instead of JSON array. I just json encoded the form params array and added a content-type/json to the request header.

sckott commented 8 years ago

sounds good