Fun with OAuth

Hi there

OK, so I’m trying to get the OAuth flow working. I want to redirect
back to a specific URI scheme (mobileagent://), and I specify that in
the app configuration (tho I’ve changed it to be http://whatever at
the moment, but that doesn’t work either)

Iv’e changed the Auth URL I’m using to this:

https://api.freeagent.com/v2/approve_app?response_type=code&client_id=MY_KEY_HERE&scope=mobileagent&access_type=offline

(ie, I’ve removed the redirect_uri). The docs say: “redirect_uri
(required unless supplied when registering) must be url escaped”

I have one registered.

Once I login, I get this:

Sorry, there’s been a problem.
Please get in touch with the author of the application you’re trying
to authorise.

If I change it to:

https://api.freeagent.com/v2/approve_app?response_type=code&client_id=MY_KEY_HERE&scope=mobileagent&access_type=offline&redirect_uri=foo

it works, and I get sent to https://api.freeagent.comfoo/?code=&state=

Any ideas whats happening here? I can specify the URI in the request,
but I thought the point was that I shouldn’t have to!

Thanks! (more questions coming)

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

Hi Nic,

There was a bug with redirect_uri handling. I’ve fixed it, so the steps
you outline below should now be working.

Cheers,

GraemeOn 19 April 2012 09:54, Nic Wise nicw@fastchicken.co.nz wrote:

Hi there

OK, so I’m trying to get the OAuth flow working. I want to redirect
back to a specific URI scheme (mobileagent://), and I specify that in
the app configuration (tho I’ve changed it to be http://whatever at
the moment, but that doesn’t work either)

Iv’e changed the Auth URL I’m using to this:

Log in to your FreeAgent account

(ie, I’ve removed the redirect_uri). The docs say: “redirect_uri
(required unless supplied when registering) must be url escaped”

I have one registered.

Once I login, I get this:

Sorry, there’s been a problem.
Please get in touch with the author of the application you’re trying
to authorise.

If I change it to:

Log in to your FreeAgent account

it works, and I get sent to https://api.freeagent.comfoo/?code=&state=

Any ideas whats happening here? I can specify the URI in the request,
but I thought the point was that I shouldn’t have to!

Thanks! (more questions coming)

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


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

Excellent! Thanks.On Thu, Apr 19, 2012 at 12:58, Graeme Boyd graeme.boyd@freeagent.com wrote:

Hi Nic,

There was a bug with redirect_uri handling. I’ve fixed it, so the steps you
outline below should now be working.

Cheers,

Graeme

On 19 April 2012 09:54, Nic Wise nicw@fastchicken.co.nz wrote:

Hi there

OK, so I’m trying to get the OAuth flow working. I want to redirect
back to a specific URI scheme (mobileagent://), and I specify that in
the app configuration (tho I’ve changed it to be http://whatever at
the moment, but that doesn’t work either)

Iv’e changed the Auth URL I’m using to this:

Log in to your FreeAgent account

(ie, I’ve removed the redirect_uri). The docs say: “redirect_uri
(required unless supplied when registering) must be url escaped”

I have one registered.

Once I login, I get this:

Sorry, there’s been a problem.
Please get in touch with the author of the application you’re trying
to authorise.

If I change it to:

Log in to your FreeAgent account

it works, and I get sent to https://api.freeagent.comfoo/?code=&state=

Any ideas whats happening here? I can specify the URI in the request,
but I thought the point was that I shouldn’t have to!

Thanks! (more questions coming)

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


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