Quickbooks Credentials expiring a month

Describe the problem/error/question

After a month of my workflow running without any issues, the quickbooks online node started giving an error. After going to the credentials and clicking reconnect, the issue is resolved. Will I have to do this every month to avoid the error or should this be refreshing automatically?

What is the error message (if any)?

The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

[
{
"quickbooksDate": "2024-09-27T00:00:00.000Z",

"error": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
}
]

Information on your n8n setup

  • n8n version: 1.50.1
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: linux

Hey @Alex4,

Thanks for posting here and welcome to the community! :partying_face:

Looking at the Quickbooks API docs it says

Refresh tokens are valid for 100 days. After that, your app must ask users to reauthorize the connection

https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/faq

At the moment our authentication doesn’t take this into consideration so we will need to have a think about the best way to implement this. At the moment though is it happening monthly or is it every 3 months?

Hi Jon
Thanks for the reply. The workflow in questions runs daily, and looking at the executions I can see that it was running fine from the 26th of August until the 26th of September, so in my case the credentials seem to have expired after a month.

Reading through the docs you linked, I see the refresh token should only expire after 100 days of not being used.

Refresh tokens are valid for 100 days . This expiry date is rolling and gets extended each time it’s used to refresh an access token.

Any help would be appreciated, thanks!

Hey @Alex4,

That was the odd thing, We should be refreshing one of the tokens or at least be working for at least 100 days.

If you turn off the error branch option does that let it work for longer maybe we don’t refresh it because the error is being ignored and not being handled correctly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.