Services Plugins FAQs

Quickbooks Plugin - Token expired

I was able to use a signup/signin login with QB as the OAuth provider and it brings me to the Intuit login page, and then redirects back to bubble with the relaimid

i was then able to make some additiional calls

then the next day i tried some calls but an getting a Token expired error – according to the QB API docs it appears the token needs to be refreshed and actually logging into QB each time i want to use the API is not need — i cant find anything within the bubble qb plugin talking about the refresh token concept…

please advise
thanks
larry

Hi @larryschul,

Thanks for reaching out and using our products. I’m afraid it is required to manually refresh the token. This is just how Quickbooks service works, it gives the token for an hour only. However, there are two options that can serve as a workaround for automatically refreshing the token. Both of workarounds include a scheduled workflow implementation in your backend:

  1. schedule a login workflow each hour, or
  2. schedule a workflow by using plugin’s data calls: Initial Auth Code Exchange and Refresh Access Token (a bit more advanced)

Note: both would require a page reload to make it work properly.

Plugin’s documentation can be found here: https://docs.zeroqode.com/plugins/quickbooks-accountig-plugin

Hope it helps.

Best,
Alex

ok - i see if i create a text input box – i can set the value of “Refresh Access Token” which contains a Refresh Token and ClientID … i also see the inital auth code exchange… and that has the value of “code”…

but there are no docs on how to use these … how to set these to the correct values…

any examples or hints you can give me on how to put this together?

thanks

Hi @larryschul,

Thanks for your feedback. Please consider our apologies with misleading, as there’s a mistake on our side. Unfortunately, after checking on this use case with our development team, these calls cannot be used to specifically schedule a workflow as you’d like. They can work as a regular implementation and not for a schedule. Meaning, they are not useful to your usecase I’m afraid. Perhaps this is a feedback for improvement that we’re going to take into consideration for future updates of our plugin, but as for now - it is required to manually authorize each time in order to make things work properly.

Sorry for this one.

so you are saying every time someone uses the bubble app to interact with QB, they will be required to be redirected to the QB login screen and type in an intuit QB username and password?

but what is the point of the refresh token, becuase based on QB dev docs, once the app is authenticated with the user/pass-- the token is good for 100 days and can be refreshed?

Hi @larryschul,

Thanks for feedback. Regarding logging in with Quickbooks - it is not required to always fill in your credentials. You just do it once, and Quickbooks doesn’t ask for it anymore. It is updated once a day.

As for token, I’m afraid we cannot influence on this matter because this is how Quickbooks works based on their new policy. The refresh token is given only for one hour.

Thank you for understanding.

what is the difference between QB Auth and QB Accounting – your 2 plugins?

Hi @larryschul,

The difference between Quickbooks Authenticate and Accounting, is that the first one is being used when you want your multiple users to connect to your single company account, but the second one is used when you want your users to be able to auth with their own account and access their own QB data.

Please check the docs for more information, perhaps you need the Authenticate one and not the Accounting.

Hope it helps.

i am writing an app for interal use. (i have a bagel business) — i want the workers in my shop to be able to acces the bubble app, and enter data into bubble that will then create a invoice or expense in qb — each of the people working will not have their own qb user/pass – they will have access to the bubble app, and i willto “connect/access” the bubble app to my quickbooks, one time, using MY qb user/pass ---- then after then – the people working in my shop – will simply use the bubble app to enter data, which as a said, will then create an invocie or expense in qb — sounds like i want “authenticate” – is this correct --and does it sound like this is doing – what i want?

QB Authenticate — does exactly what i want — appears i was using the wrong plugin… i have successfully connected to QB – and have been able to make calls…

thanks for you help —

Hi @larryschul,

I’m glad the Authenticate one is satisfying your project requirements. If you like our plugin so far, could you please rate it by going to Plugins tab in Bubble editor? You can find the plugin by name and give it as many stars as it deserves. The more feedback we get, the more motivated we are to build great plugins!

Thanks :pray:

Hey @alexandru. My use case is for a SaaS product where different organizations can connect their QB account and create customers, vendors etc in their own QB account.

For this, I am using the QB Sandbox plugin to make the calls and it is working in the test version. However, I am getting token expired errors and I’ve tried to use QB Authenticate but I don’t know if it’s the right plugin.

How can I handle the expired token?

Hey @alexandru and @zeroqode2 team. Can you guide me on this?

Hi @himanshu,
Thank you for reaching out, and sorry for the delayed reply. :pray:

The difference between Quickbooks Authenticate and Accounting, is that the first one is being used when you want your multiple users to connect to your single company account, but the second one is used when you want your users to be able to auth with their own account and access their own QB data.

Please check the docs for more information, perhaps you need the Accounting one and not the Authenticate.

As for token, I’m afraid we cannot influence this matter because this is how Quickbooks works based on their new policy. The refresh token is given only for one hour - Intuit Developer

Thank you for understanding.

In case I can help you with any additional information - let me know.
Best regards,