API v2 - You specified an invalid image for Droplet creation.

As you read the title when i make request with PHP cURL i get the response message of invalid image.

I can see all the image listings “/v2/images/” including the one i request with JSON data which looks like this: <pre> { “name”: “My-Droplet”, “region”: “nyc1”, “size”: “4gb”, “image”: 4201396 } </pre> Now the image 4201396 is totally exist and I also able to get image details “/v2/images/4201396”.

Why the droplet creation API method didn’t recognize the image id? How can i prevent the error? And why the error occurred?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

My problem was that I was trying to select my private snapshot by name, while the docs state you need to use its numeric ID. I was able to find this by inspecting the DOM of the DigitalOcean control panel, but I’m sure theres better ways for that.

  1. Item 1
  2. Item 2
  3. Item 3* Item
  • Item**********

hey guys,

same here,

  1. have created a droplet D1
  2. done a snapshot S1
  3. was able to spin new worker droplets off the S1 snapshot via API dozen of times
  4. have tweaked the D1 droplet into D1’
  5. redid snapshotting of D1’ into S2
  6. removed S1
  7. now NOT able to spin up any new workers with all the same properties as before, via API based on the S2 snapshot the error: digitalocean.DataReadError: You specified an invalid image for Droplet creation. em using this wrapper:

listing all images does return the said S2 snapshot , and its statuses looking correct.

fetching the S2 directly via its ID (obtained when listing all) returns the image with exactly the same name I’m trying to use to spin up a new droplet. Tried renaming the hell out of it, to no avail. what the ?

EDIT: I can’t be sure but this looks like an issue with private snapshots altogether. None of my old snapshots work anymore. Sadly the one that I used right before this all collapsed had been disposed, so can’t compare with thing that I know worked literally yesterday. But even 10month old snapshots are no go currently, if that is an indication to anything…