Server error: 'POST https://api.reckon.com/RAH/v2' resulted in a '500 Internal Server Error' respons
Options
Raymond Dacillo
Member Posts: 12 ✭
Hi,
Just want to ask why I always getting this error when I request to the api.
Here's my code when requesting to your api
HttpClient::request('POST', 'https://api.reckon.com/RAH/v2', [
'body' => '{"FileName":"Q:\\Cougar Enterprises.QBW","Operation":"<?xml version="1.0\""?><?qbxml version=\""6.1\""?><QBXML><QBXMLMsgsRq onError=\""continueOnError\""><SalesTaxCodeQueryRq /></QBXMLMsgsRq></QBXML>"",""UserName"":""Admin"",""Password"":""admin"",""CountryVersion"":""2019.R2.AU""}',
'headers' => [
'Authorization' => 'Bearer 4785b4ab2ea91351ba4202a04f9ba893myToken',
'Content-Type' => 'application/json'
]
]);
"
Just want to ask why I always getting this error when I request to the api.
Here's my code when requesting to your api
HttpClient::request('POST', 'https://api.reckon.com/RAH/v2', [
'body' => '{"FileName":"Q:\\Cougar Enterprises.QBW","Operation":"<?xml version="1.0\""?><?qbxml version=\""6.1\""?><QBXML><QBXMLMsgsRq onError=\""continueOnError\""><SalesTaxCodeQueryRq /></QBXMLMsgsRq></QBXML>"",""UserName"":""Admin"",""Password"":""admin"",""CountryVersion"":""2019.R2.AU""}',
'headers' => [
'Authorization' => 'Bearer 4785b4ab2ea91351ba4202a04f9ba893myToken',
'Content-Type' => 'application/json'
]
]);
"
0
Comments
-
Hi Raymond,
I'm not that familiar with guzzle, but maybe try using json_encode() on your body. Or if that doesn't work try using json instead of body http://docs.guzzlephp.org/en/stable/request-options.html#json.
I can show how I get it to work with curl if you want.
Regards,
Shane
Reckon API Team
0 -
Hi Shane,
You're right. I just need to use json instead of body. Thanks0
Categories
- All Categories
- 6.4K Accounts Hosted
- 10 📢 Reckon Accounts Hosted - Announcements
- 5.9K Reckon Accounts (Desktop)
- 3 📢 Reckon Accounts Desktop - Announcements
- 1.3K Reckon Payroll 🚀
- 21 📢 Reckon Payroll - Announcements
- 21 Reckon Payroll Help Videos 🎥
- 21 Reckon Mate App
- 3K Reckon One
- 7 📢 Reckon One - Announcements
- 10 Reckon Invoices App
- 14 Reckon Insights
- 107 Reckon API
- 822 Payroll Premier
- 307 Point of Sale
- 1.9K Personal Plus and Home & Business
- 62 About Reckon Community