Any problems with the API at present?

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.


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

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?On Mon, Apr 30, 2012 at 11:25, Graeme Boyd graeme.boyd@freeagent.com wrote:

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

On 28 April 2012 15:26, Nic Wise nicw@fastchicken.co.nz wrote:

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:

500 Internal Server Error

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.

On Sat, Apr 28, 2012 at 15:17, Nic Wise nicw@fastchicken.co.nz wrote:

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:

Log in to your FreeAgent account

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 | Nic Wise - Tend Health Ltd | LinkedIn
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


Nic Wise
t. +44 7788 592 806 | @fastchicken | Nic Wise - Tend Health Ltd | LinkedIn
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


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@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


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

Nic Wise
t. +44 7788 592 806 | @fastchicken | Nic Wise - Tend Health Ltd | LinkedIn
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

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,

GraemeOn 28 April 2012 15:26, Nic Wise nicw@fastchicken.co.nz wrote:

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:

500 Internal Server Error

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.

On Sat, Apr 28, 2012 at 15:17, Nic Wise nicw@fastchicken.co.nz wrote:

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:

Log in to your FreeAgent account

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 | Nic Wise - Tend Health Ltd | LinkedIn
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


Nic Wise
t. +44 7788 592 806 | @fastchicken | Nic Wise - Tend Health Ltd | LinkedIn
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


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@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

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:

500 Internal Server Error

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.On Sat, Apr 28, 2012 at 15:17, Nic Wise wrote: > 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

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.


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