Hi, We are having issues with our users integrations with InfusionSoft being disconnected if not used for a period of time. Can anyone advise us on what exactly is the Refresh Tokens life time? When does it expire?
In order to keep users accounts connected I’m assuming we have to run a cron job to refresh each token and prevent the authentication from expiring? Or is there an easier way to do this?
Refresh Tokens expire after six months. Access Tokens expire after 24 hours.
You can keep your ATs fresh with a cron job run every 23 hours, or you can make a call with the AT, and if it fails, refresh it at that time using the RT. This latter course is simpler, but adds a delay to the first call made for a given user each day.
You should have a cron job that updates all Refresh Tokens once a week, so that in the case that a user doesn’t log in to your application for an extended period of time you won’t have to re-walk the autorization process.