Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to connect to the Quickbooks API, I have worked through the OAUTH2 negotiation, and can make a single get request to work, but a POST to retrieve a list of accounts fails.
This is what I'm doing:
When run, this results in:
.-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------.
| tLogRow_1 |
|=----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|Body |ERROR_CODE|
|=----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|{"Fault":{"Error":[{"Message":"Error parsing query","Detail":"QueryParserError: null","code":"4000","element":"Query"}],"type":"ValidationFault"},"time":"2023-10-23T08:40:40.002-07:00"}|400 |
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------'
It seems to me that the body is not being encoded properly, but I can't determine the correct format for the body. The Query string works correctly in Postman, I copied it directly.
Hello @Mark Murphy
I haven't never used Quickbooks API, but looking into its doc it seems you should set the "Content type" header as "text/plain" and the HTTP Method would be GET instead of POST:
https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/companyinfo#query-companyinfo
Turns out that POST is correct here, but I needed "Content-Type" = "application/text"