Search code examples
pythonimgur

imgur API - lots of credits left but ImgurClientRateLimitError: Rate-limit exceeded


i'm using the python imgur client to do some uploads but i'm getting

ImgurClientRateLimitError: Rate-limit exceeded!

I've done nowhere near 500 api requests an hour and this is what my current credits look like:

{   u'ClientLimit': 12500,
    u'ClientRemaining': 12500,
    u'UserLimit': 500,
    u'UserRemaining': 500,
    u'UserReset': 1429698684
}

I've gone over the docs here https://api.imgur.com/#limits but can't find anything to indicate why i would be getting rate limit error.

Does anyone know why i'm getting this?

my specific upload call looks like

x = imgur_client.upload_from_url(url, config=None, anon=True)

-------- update -----
Here's screenshots of stats in mashape. i don't see how i could possibly be anywhere near the limit.

http://i.imgur.com/Oulh8tn.png http://i.imgur.com/OFQNZwe.png


Solution

  • For those encountering this, the solution is to make sure you send your mashape key in your HTTP headers.

    At the time i made this post, it wasn't supported in the default imgur python library but it is now.

    https://github.com/Imgur/imgurpython/blob/master/imgurpython/client.py#L76