Fast expiring token

Hi! I’m doing a sub-only login with Twitch accounts, and I got it working, but the token I use to check my subs, and so the one I use for login (Only a sub check, not generating other) expires minutes after I generate it.

How can I use my token without expiring when 15 minutes passed or is there another way to check subs?

Thanks in advance,

Sounds like you are not resuing the token.

And you have a misfiring script that is generating/regenerating tokens.
You can have 25 active tokens (per user) and on number 26 it kills access token/refresh token 1.

You should be getting authentication from the broadcaster (in this case you, since you said “your subs”), store that use as needed and refresh every 4 hours (since the normal expire time for a user access token is 4 hours).

So you should be using the refresh token to get a new access token ever 3 1/2 hours or so.

So if your token is dying every 15 minutes, you’ve got something else going on that is killing your token.

Oh, yeah, the refresh token, forgot about that…

But in terms of the token dying fast, I’ll check if there’s something generating new tokens, but I’m pretty sure It doesn’t, specially because the login code only works once…

Anyways, I’ll implement the refresher and see if it has been fixed with that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.