5xx errors mean that “twitch is broken try again later”
For this use case EventSub is a better fit
As twitch will tell you when the stream goes live/offline instead of you having to go check.
Also note that Kraken is deprecated and you should move to helix
You would use an app access token here for server to server requests