I have only been recently accessing the Twitch API and am currently having a blast. I am currently using a Python program that makes a request to get the /streams/summary to track the increase/decrease of channels and viewers. I am running an infinite loop but I am calling the sleep function to wait every 2 minutes before making another request. After about 3-4 calls I get this error message.
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
So I guess I have two questions:
Is this related to my program requesting too often?
As far as I know there is not limiting when it comes to API calls. Fugiman talked about it here. As far as I know this policy hasn’t changed. What rate are you getting that 503 error at? Once every 15 calls, maybe more maybe less? I have a script that currently grabs the same summery metrics of viewers and channels and sends it off to a data stream; this runs every minute and I just have an error check to make sure I’ve pulled information before I send it off. Not sure if you’re doing this already but it’s a good idea.