TIL Putting a redundant API key as a backup
POSTED ON:
TAGS: api
Have a backup API key in your system. If you get a rate limit error, you can switch over to it.
Great if you're using a free project and need a quick workaround.
But just remember not to abuse resources.
The fatal bug that caused me to take down my bot was that I hit an hourly API rate limit. I took the obvious approach of keeping redundancy in my system: Keep an alternative API key, and once the primary one runs out, switch over to the alternative, and then switch back at the turn of the hour.
Related TILs
Tagged: api