QuickBooks API Token refresh process failing periodically #29
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The QB Online token refresh process is periodically failing and then resulting in portal accounts losing the QB Online connection. The current process takes place in real-time as requests are made. This process can fail once or twice before "giving up", at which time the active token can't be refreshed. It's not fully apparent why the failures occur as we are seeing a somewhat generic error being logged.
The current plan is to rewrite the refresh process to take place in the background rather than in real-time. The idea is that we can allow retries to happen over a much longer span of time in the event that their is a failure with the refresh. QB Online API tokens have a one hour TTL, so we will likely begin to refresh any token that has reached 40-45 minutes in age. That gives our servers 10-15 minutes to retry and fetch a refreshed token before the current token expires.