Obtaining token - get HTTP Basic: Access deined

Hi there,

I’ve gone through the steps required and got a code going to my callback page from an oauth approval for an app.

I have correctly included the app id and secret in the basic auth parameters.

I have added the code and grant_type parameters in the body of the post but I still get HTTP Basic: Access denied. and a 401 response from https://api.freeagent.com/v2/token_endpoint

I see quite a few other people get this issue from time to time…any ideas of what I might be doing wrong…edited curl pasted.

curl --location ‘https://api.freeagent.com/v2/token_endpoint’ \

–header ‘Authorization: Basic ********************************************’ \

–form ‘code=“**************************”’ \

–form ‘grant_type=“authorization_code”’

Hey Rolf! :wave:

Thanks for raising this, I’m sorry you’ve been having issues getting access, I know this post is a bit older but I wanted to reply to it- because as you say it does seem to come up from time to time and I know other devs have experienced the same. It would be good to have the discussion in one place so we can put our findings here. If anyone reading this also has this issue, and would prefer to share the details privately, you can get in touch with our friendly support team and ask to be put in touch with us in Support Engineering. We can then dig into it a bit more!

I wanted to just post a quick message to let you know I’ll be having a look at this in this sprint (next 2-3 weeks) so I will be posting my findings after I’ve finished testing in curl. I’m pretty confident you entered everything correctly going by your post, and with multiple devs experiencing the error I don’t think it’s down to a mis-type or user error. Sounds like something in the process is going wrong along the way.

If you have any extra info to share please feel free, but in the meantime I’ll have a test of this and see if I can a) replicate it on my side and b) if I can, then get down to the cause.

Thanks very much for raising this, I’ll be in touch-

Thanks! :smiley: :+1:
Carly

Hi Rolf & all reading,

I tried to get this to replicate on my side but everything seemed to be working as expected. I’m going to leave this post up for reference- and also so anyone else having this issue can add to the thread here (or as per my last message get in touch with us direct).

If you or any other devs are still getting this 401 response could you first double check everything is correctly entered (although I’m quite confident this isn’t the issue, good to rule out) and then provide me as much info as possible about the error and process (omitting any private info) please?

I would ask that anyone else having this issue let me know what stage of the process you got to and when the errors appear. Eg. Is it the same situation as Rolf or maybe different? I can then review the reports and see if I can troubleshoot what is going on and why this is happening for certain users. When I have time I’ll continue playing about with this and see if I can replicate it and try and solve it in the meantime.

If anyone has anything further to comment/ report on this it would be really handy to include in this thread. Thanks all! :smile: :cherry_blossom: