I am struggling to connect to Quickbooks API through Retool

I am simply trying to connect to Quickbooks API to make a journal entry. Their connection requires OAuth2.0.

I have an app with a client ID and secret and I know I need to use this to get a Realm ID and Access Token but I am confused about the Retool side of this.

Hey @David57940!

Are you needing to query multiple companies with the Quickbooks API? It looks as though there's some trouble grabbing the RealmID programmatically from their OAuth2 flow but since it's static (it's the same as the Company ID) you can use their oauth playground to grab it and then hardcode it into any requests you send via Retool.

The rest you should be able to set up using a normal OAuth 2.0 flow:

First, make sure you've created an OAuth app within the Intuit Developer Portal as mentioned in these docs. It looks as though that should provide you with the Client ID and Client Secret you'd need to set things up on Retool's end:

I'd imagine you can get the Authorization URL and Access Token URL from there as well, but if that doesn't work I would try the following:

Authorization URL:

https://appcenter.intuit.com/connect/oauth2

Access Token URL:

https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer

That should give you the Access Token which you can pass to your API request in your resource setup using the magic string OAUTH2_TOKEN:

Pass that with the hardcoded RealmID I mentioned before and you should be good to go!

2 Likes

Thank you this helped, the issue I was having was something pretty dumb on my end. I wasn't adding the Retool redirect URL into the Quickbooks app which was breaking the entire connection. This was a great response and outlines everything a user needs to connect to Quickbooks, thank you.

1 Like