python-quickbooks icon indicating copy to clipboard operation
python-quickbooks copied to clipboard

Issue with python-quickbooks doing automatic token refreshes when access_token is not given to AuthClient

Open kyleb-app opened this issue 5 months ago • 0 comments

I identified a problem that I feel a lot of users are experiencing based on search results pointing to multiple QB forum posts.

When instantiating the AuthClient from the intuit library, you MUST pass in the access_token because if you do not the python-quickbooks library will issue a token refresh for every call. This will conflict with your existing token refresh task/function, because when python-quickbooks does it (in the rare event a new refresh token is issued during this time, which is about once every 24h) it will not save the new refresh token to your database, and it will invalidate the old one (which is the one still in your database). This will cause invalid grant errors for every token refresh request you issue in the future, until you relink your app to Quickbooks online.

kyleb-app avatar Aug 15 '25 18:08 kyleb-app