Twitch api cURL php return Invalid OAuth token error

Offers an opinion on a “cron job”

In this example it sores the generated token in auth.json

And whenever generate_and_maintain_token.php is run (likely via cron) it will load the token, validate it and regenerate if theres less than an hour left on it.

So, if you retrain the token into “storage” then you can use the token till it’s close to expire.
But depends how you use the otken and what makes sense for your application and usage