OAuth Error When Requesting the Access Token

I am building a C# app for FreeAgent and I have run into a problem when
requesting the Access & Refresh tokens after the user has authorised the
app. I’m getting this error: {“errors”:{“error”:{“message”:“Resource not
found”}}}.

I am posting the request to:
https://api.sandbox.freeagent.com/v2/token_endpoint.
This is the body:

grant_type=authorization_code
&code=1RusshxN1f4HlINk9nQd-rN6SIHx-nGTi-HpfAvdP
&redirect_uri=https%3a%2f%2XXXXXX.azurewebsites.net%2fMahoeTrader%2fIntermediary%2fListeners%2fFreeAgentOAuth%2f

I’m not sure where I’m going wrong. Can someone help?

-Paul.

Hi Paul,

Are you using HTTP Basic auth as described in the docs? If not that may be
your problem.

https://dev.freeagent.com/docs/oauth#the-access-token-request

Regards,
Harry MillsOn Fri, Oct 24, 2014 at 10:34 PM, paul.peat@mahoetrading.com wrote:

I am building a C# app for FreeAgent and I have run into a problem when
requesting the Access & Refresh tokens after the user has authorised the
app. I’m getting this error: {“errors”:{“error”:{“message”:“Resource not
found”}}}.

I am posting the request to:
https://api.sandbox.freeagent.com/v2/token_endpoint.
This is the body:

grant_type=authorization_code
&code=1RusshxN1f4HlINk9nQd-rN6SIHx-nGTi-HpfAvdP
&redirect_uri=https%3a%2f%2XXXXXX.azurewebsites.net
%2fMahoeTrader%2fIntermediary%2fListeners%2fFreeAgentOAuth%2f

I’m not sure where I’m going wrong. Can someone help?

-Paul.


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.