Any problems with the API at present?

Showing 1-4 of 4 messages
Any problems with the API at present? Nic Wise 4/28/12 7:17 AM
Hi there

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:

https://api.freeagent.com/v2/approve_app?response_type=code&client_id=p5zxxxxxxxxxxxA&redirect_uri=http%3A%2F%2Fwww.fastchicken.co.nz%2Foauth%2F&state=foo

I authenticate, and get this back

http://www.fastchicken.co.nz/oauth/?code=1TkFRYmEPxxxxxxxxuGiHRWQpkpe&state=foo

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?

Ta

Nic

--
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
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.
http://goo.gl/IuBU
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
Accept:
User-Agent: RestSharp 102.7.0.0
Content-Length: 0
Host: api.freeagent.com
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
wrong.</body></html>
Re: Any problems with the API at present? Graeme Boyd 4/30/12 3:25 AM
Hi Nic,

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.

Cheers,

Graeme



--
You received this message because you are subscribed to the Google Groups "FreeAgent API" group.
To post to this group, send email to freeag...@googlegroups.com.
To unsubscribe from this group, send email to freeagent_ap...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freeagent_api?hl=en.




--
Graeme Boyd
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?