|Any problems with the API at present?||Nic Wise||4/28/12 7:17 AM|
I'm writing a client using the new API, and I'm getting problems with
the live API calls. This is code which worked a few days ago.
I'm hitting a normal URL:
I authenticate, and get this back
I then hit the "get an access token" (and then refresh it, as this is
my test app....) and I get a token back:
1PicTrtTWxxxxxxxx21LYe / 1IBLH8T-vlixxxxx2A7rd6Th4loT / bearer / 604800
I then call /v2/company, and I get a 500 error back from the server.
Any ideas why /v2/company is returning a 500 error now?
t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
Earnest: Self-employed? Track your business expenses and income.
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
|Re: Any problems with the API at present?||Nic Wise||4/28/12 7:26 AM|
BTW, here's my call to the company endpoint
GET /v2/company HTTP/1.1
Authorization: Bearer 1ewO4iFG_xxxxxJowI6V8siK
User-Agent: RestSharp 18.104.22.168
Accept-Encoding: gzip, deflate
and the response:
<html><body><h1>500 Internal Server Error</h1>If you are the
administrator of this website, then please read this web application's
log file and/or the web server's log file to find out what went
|Re: Any problems with the API at present?||Graeme Boyd||4/30/12 3:25 AM|
Can you please set the Accept header? So if you want JSON from the API set it to "Accept: application/json", XML "Accept: application/xml". Otherwise leave it out entirely. Specifying the accept header and leaving it as an empty string causes problems.
Senior Software Engineer
FreeAgent Central Ltd
40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774
|Re: Any problems with the API at present?||Nic Wise||4/30/12 4:09 AM|
Thanks Graeme, that works now. For some reason, I was resetting the
handlers at my end, and it wasn't adding in the accept types.
Whats strange, this was working last week. Just stopped around
saturday. Did you guys change something at your end around Friday-ish?