Basic Auth seems to fail

Hi Jasper,

Just to let you know, I’ve found your requests in our logs and I’m trying
to ascertain why you’re receiving a 401 (Unauthorized) when your client_id
and client_secret are used in HTTP Basic Auth.

For now, you can explicitly pass “client_id” and “client_secret” as
parameters in the request URL and this should resolve your problem.

I’ll let you know our findings about the problem with Basic Auth.

Thanks,
Dave JOn 19 May 2015 at 10:06, Jasper Kennis info@jasperkennis.nl wrote:

I’m trying to exchange an Authorisation Token for an Access and Refresh
token, but it seems like the token_endpoint is refusing my request as if
I’m passing the wrong username and password. I’ve been testing the endpoint
using postman, and whenever I make the post call the basic auth modal pops
up as you’d expect. However even if I directly copy the OAuth Identifier
and Secret as Username and Password, the passed values don’t seem to be
accepted. I’m sending along the grant_type, code and even redirect_uri, but
it’s no good, I keep getting the same HTTP Basic: Access denied. error.

At this point I can’t think of any other reason for this then a bug in the
authentication proces, but I might be overlooking something? Help would be
greatly appreciated.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

David Jones
Senior Support Engineer

FreeAgent

Hi Jasper,

No problem, glad you got it sorted!

Just to follow up, and to potentially help other users who find this
thread, it looks like we’ll return a 401 (Unauthorized) if the OAuth
Authorization token passed to /token_endpoint is incorrect.

In other words, your client_id and client_secret were probably correct
(since you copied and pasted) but if the authorization token was invalid
(perhaps it had been used more than once), you’ll see that 401 error.

I hope this helps.On 19 May 2015 at 13:02, Jasper Kennis info@jasperkennis.nl wrote:

Tnx Dave,

I think I figured it out already tho; I had closed this topic. I had been
testing with a newly created sandbox app, but I think I’ve been making
calls to the regular api endpoint first. However I do believe I tried both
and neither worked for me at first, but I’m not too sure anymore.

Maybe it’s not worth your time; I was probably being sloppy. Good to know
I can pass client id and secret as url params tho, might be convenient
sometimes.

Thanks! J

Op dinsdag 19 mei 2015 13:57:34 UTC+2 schreef David Jones:

Hi Jasper,

Just to let you know, I’ve found your requests in our logs and I’m trying
to ascertain why you’re receiving a 401 (Unauthorized) when your client_id
and client_secret are used in HTTP Basic Auth.

For now, you can explicitly pass “client_id” and “client_secret” as
parameters in the request URL and this should resolve your problem.

I’ll let you know our findings about the problem with Basic Auth.

Thanks,
Dave J

On 19 May 2015 at 10:06, Jasper Kennis in...@jasperkennis.nl wrote:

I’m trying to exchange an Authorisation Token for an Access and Refresh
token, but it seems like the token_endpoint is refusing my request as if
I’m passing the wrong username and password. I’ve been testing the endpoint
using postman, and whenever I make the post call the basic auth modal pops
up as you’d expect. However even if I directly copy the OAuth Identifier
and Secret as Username and Password, the passed values don’t seem to be
accepted. I’m sending along the grant_type, code and even redirect_uri, but
it’s no good, I keep getting the same HTTP Basic: Access denied. error.

At this point I can’t think of any other reason for this then a bug in
the authentication proces, but I might be overlooking something? Help would
be greatly appreciated.


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_ap...@googlegroups.com.
To post to this group, send email to freeag...@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

David Jones
Senior Support Engineer

FreeAgent

Tnx Dave,

I think I figured it out already tho; I had closed this topic. I had been
testing with a newly created sandbox app, but I think I’ve been making
calls to the regular api endpoint first. However I do believe I tried both
and neither worked for me at first, but I’m not too sure anymore.

Maybe it’s not worth your time; I was probably being sloppy. Good to know I
can pass client id and secret as url params tho, might be convenient
sometimes.

Thanks! JOp dinsdag 19 mei 2015 13:57:34 UTC+2 schreef David Jones:

Hi Jasper,

Just to let you know, I’ve found your requests in our logs and I’m trying
to ascertain why you’re receiving a 401 (Unauthorized) when your client_id
and client_secret are used in HTTP Basic Auth.

For now, you can explicitly pass “client_id” and “client_secret” as
parameters in the request URL and this should resolve your problem.

I’ll let you know our findings about the problem with Basic Auth.

Thanks,
Dave J

On 19 May 2015 at 10:06, Jasper Kennis <in…@jasperkennis.nl <javascript:>> wrote:

I’m trying to exchange an Authorisation Token for an Access and Refresh
token, but it seems like the token_endpoint is refusing my request as if
I’m passing the wrong username and password. I’ve been testing the endpoint
using postman, and whenever I make the post call the basic auth modal pops
up as you’d expect. However even if I directly copy the OAuth Identifier
and Secret as Username and Password, the passed values don’t seem to be
accepted. I’m sending along the grant_type, code and even redirect_uri, but
it’s no good, I keep getting the same HTTP Basic: Access denied. error.

At this point I can’t think of any other reason for this then a bug in
the authentication proces, but I might be overlooking something? Help would
be greatly appreciated.


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent