I recently come across a Quickbooks API flow and it has helped me a lot in starting extract data from Quickbooks. However, I run into expired refresh token issue when I want to run the flow on a daily basis. Even though refresh token said to expire in 101 days, it expires sooner than expected ( ~ 2 days) and would require manual update through Quickbooks Playground. Is there a way to automate the getting refresh token step?
1) Shorten duration of your access token.
2) Create a first step to your process where you use credentials to generate the access token:
IE feed equivalent of:
curl -X POST 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer' \ -H 'Accept: application/json' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: REPLACE_WITH_AUTHORIZATION_HEADER (details below)' \ -d 'grant_type=authorization_code' \ -d 'code=REPLACE_WITH_AUTHORIZATION_CODE' \ -d 'redirect_uri=REPLACE_WITH_REDIRECT_URI'
to download tool.
3) Use new process with new token each time.
thanks for your quick response. Is it possible to guide me through how to configure details in step 2 to download tool? The current flow seems to have this url configured but I don't know how to setup for the rest.
https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer
Are you using a .yxi? sorry - I don't use out of the box connectors -- someone else might have more info on that... my recommendation would be to follow the steps on that page and set up your own app with 127.0.0.1 as your redirect if you don't have one.