github-cards icon indicating copy to clipboard operation
github-cards copied to clipboard

API rate limit exceeded for IP

Open shahroznawaz opened this issue 8 years ago • 3 comments

Hey I've got this error

API rate limit exceeded for IP 1xx.x.1x7.x5. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

How to solve this?

shahroznawaz avatar Aug 26 '17 19:08 shahroznawaz

Hi, I'm not the repo owner. Anyway, the GitHUb API utilized by the plugin has a rate limit. That means that if you hit reload several times in a row, the error will appear. give it a while and the error will disappear again. A potential solution would be to generate an authentication token for the API and supply that to the card, though I don't see the support in the plugin yet. Also, that would mean that you would blast a GitHub api key into the open world which would be against the GitHub terms and conditions.

Anyway, we need a solution for highly frequented sites. Any ideas?

vatbub avatar Jan 25 '18 09:01 vatbub

Caching the stats seems like the best way around this, but I can't think of how to do that with only a simple JavaScript plugin.

andrewda avatar Jan 25 '18 15:01 andrewda

Since the IP limit is by IP address, and the IP address is from the user viewing the cards, just save the data to a localStorage, and only request again to GH API after some day, I don't think that this must be updated in real time and I don't think that someone seeing the card really want to see information from the last minute for example

guibranco avatar Jan 20 '20 02:01 guibranco