You need to sign in to do that
Don't have an account?
JeffreyStevens
Quickbooks online oAuth version wrong
I'm getting connected to QB Online and authenticated, but now I'm trying to get a list of accounts. I'm getting an invalid version on my return.
Here is the request that I'm using....
system.HttpRequest[Endpoint=https://sandbox-quickbooks.api.intuit.com/v3/company/13860xxxxx/query?query=SELECT * FROM Account, Method=GET]
The header is this:
OAuth oauth_consumer_key="qyprdkbWYESxxxxxxxxxxxxxH", oauth_nonce="-1898820638843667087", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1454507703", oauth_token="qyprdswhS3apsDvUS3HmHxxxxxxxxxxxxxxx7X0tKGxBj3oCmnU", oauth_version="1.0", Host="qbo.intuit.com", Connection="Keep-Alive", oauth_signature="rgnqOLJqe11xxxxxxxoyG82voyMg%3D"
And my response is:
System.HttpResponse[Status=Unknown Version, StatusCode=400]
I've tried taking the version out. I've tried chainging it to 2.0 - I still get the same error.
Any thoughts?
Here is the request that I'm using....
system.HttpRequest[Endpoint=https://sandbox-quickbooks.api.intuit.com/v3/company/13860xxxxx/query?query=SELECT * FROM Account, Method=GET]
The header is this:
OAuth oauth_consumer_key="qyprdkbWYESxxxxxxxxxxxxxH", oauth_nonce="-1898820638843667087", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1454507703", oauth_token="qyprdswhS3apsDvUS3HmHxxxxxxxxxxxxxxx7X0tKGxBj3oCmnU", oauth_version="1.0", Host="qbo.intuit.com", Connection="Keep-Alive", oauth_signature="rgnqOLJqe11xxxxxxxoyG82voyMg%3D"
And my response is:
System.HttpResponse[Status=Unknown Version, StatusCode=400]
I've tried taking the version out. I've tried chainging it to 2.0 - I still get the same error.
Any thoughts?
Thank to all of looked at this with me.
All Answers
[1] https://developer.intuit.com/docs/api/accounting/Account
I wonder if I need to encode my strings? Notice how I have spaces in the query statement?
[1] https://developer.salesforce.com/docs/atlas.en-us.200.0.apexcode.meta/apexcode/apex_classes_restful_encodingUtil.htm#apex_System_EncodingUtil_urlEncode
Hey Jeff,
I am having one question why are you using qbo.intuit.com url as host? Please try it with below:
qb.sbfinance.intuit.com
Thanks!
Padmesh
Thank to all of looked at this with me.
I have the same issue with QuickBooks queries, my code works fine with other API calls but fails on queries. I pretty sure my sign method is correct but I think I have some issue encoding the query param. If you have the possibility would mind share your code?
Thanks in advance.
Can anyone post the custom code to integrate Salesforce with Quickbooks using API's. I am new to integration.
Help will be very much appreciated.
Thanks.