What I learned connecting to Quickbooks Online API via REST

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

What I learned connecting to Quickbooks Online API via REST

Post by Jaymer »

I am able to now connect to quickbooks online API via REST, using Aware 8.6, bld 2922

1st problem was the redirect_uri
aware appends this automatically to the request - and in quickbooks you have to specify the redirect_uri in your app.
These must match. Even though I was https, Aware appends ":443" (redundant) and this was causing a mismatch because my manually-entered redirect_uri in QB didn't have that. Added that and moved to next issue.

After QB login, aware (in the browser) showed an error saying: "response body is incorrect".
I debugged this (1hr) and saw the response that was coming back. Thought this was the error but was wrong. Couldn't get past it.
After paid support call with Vlad, turns out that he examined code and saw that the response I saw was in fact being handled fine, THEN another request for AuthToken was made - and the error I was getting (could have been explained better in the error message) was because it couldn't decode the AuthToken.

Method needs to be POST.
Result is JSON.
And Voila.

OK, so that handled Auth and refresh tokens.
There are still some issues in the base URL that are tricky.
There are issues with "state" (used in OAuth) and Reply values - fixes coming in bld 2934. I'd advise only using that.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply