25.03.2022, 08:38
(25.03.2022, 07:30)admin Wrote: Put your access and refresh tokens into storage. Create a scheduled script to handle the refresh and put updated tokens back into storage. All other scripts will use stored tokens for requests.
Thanks, how can I be approximate in expiry time, if I request the refresh token before expiry time lapses a new token is not returned, if I have a scheduled script running say every 10min to refresh tokens I might have to wait before the new token is returned and I guess it is depending on when the last call was made and when the scheduled script is due to run.
I am thinking Is it possible to calculate os.time() + expire_sec and make a script run at this approximate time?