Like I said, Twitch tells you the expiration of a token when it gives you the token, so you know when it is due to expire. If you want to wait for a token to expire and fail a validation check or API call before refreshing, that’s your choice, personally I refresh all my tokens before expiration which both checks the user is still connected to my app and prevents any API failures due to invalid authentication.