Trouble deleting photos from album using Imgur's API

Hey folks, I’m having a weird issue with the Imgur API. I can make albums and add pics just fine. But when I try to take a photo out, it’s not working right.

The API says it’s all good:

{
  'success': True,
  'data': True,
  'status': 200
}

But the photo stays put! I’m pretty sure I’m sending the delete request correctly.

To make it weirder, my album page is acting up. I’ve tried to remove and add the same pic a few times. Now it shows 3 pics in the album list, but only 1 when I open it.

Any ideas what’s going on? Is this a bug or am I missing something? Thanks!

I’ve encountered this issue before while working with the Imgur API. It appears to be a caching problem on their end. Despite receiving a successful response, the changes aren’t immediately reflected in the frontend. My suggestion would be to implement a delay of about 30-60 seconds after the delete request before refreshing the album. This usually allows enough time for their system to propagate the changes. If the problem persists, you might want to consider reaching out to Imgur’s support team directly. They can provide more insight into any potential backend issues or API quirks that might be causing this behavior.

I’ve dealt with this exact issue in a project I was working on. It’s frustrating, but there’s a workaround. The API is actually deleting the image, but Imgur’s CDN takes time to update. What worked for me was implementing a retry mechanism.

After sending the delete request, wait about 10 seconds, then fetch the album details again. If the image is still there, wait another 10 seconds and try again. I usually set it to retry up to 5 times.

Also, make sure you’re using the correct delete endpoint. It should be a DELETE request to /3/image/{imageHash} if you’re removing from Imgur entirely, or /3/album/{albumHash}/remove_images if just removing from the album.

If all else fails, you might need to delete and recreate the entire album. It’s not ideal, but sometimes it’s the only way to force Imgur to sync properly.

yo, had similar probs w/ imgur API. try clearin browser cache/cookies. sometimes the frontend gets outta sync w/ the backend. also, double-check ur using latest API version. they change stuff n don’t always update docs. good luck man!