The call to generate a token returns the expires in time
You can also use the validate endpoint
To validate a token and get the remaining time on a token.
Depends what I’m using the token for.
For subscribers, like your use case, I always attempt to refresh the token before I fetch all subscribers, because I either fetch once per day, (so the token will always be dead), or my the time schedule I use I’ll do a validate first to check the token and refresh as needed to fit my time schedule