Search code examples
pythongoogle-app-engineimgur

Imgur API won't remove image from album


I'm using the Imgur API to create an album under a users account, and then add or remove images from that album.

I can authenticate successfully, create the album, and add images to the album without a problem.

When I go to remove an image from the album, I get this response:

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

However, the image remains in the album. As far as I can tell, I'm correctly sending the request using an HTTP delete.

The Imgur album page also seems to have gone a little screwy. After having attempted to remove and re-add the same image to the album a few times, the albums page of my account lists the album as having 3 images. But if I go into the actual album, it says it only has one image.

Does anyone have any ideas what might be going on here?


Solution

  • I was mistakenly using the DELETE call wrong. I was including the ids I wanted to remove as parameters in the request, as if it was a POST request.

    Instead I needed to include the ids in the URL like this:

    https://api.imgur.com/3/album/{album}/remove_images/?ids={theid}