FREE AGENT API Access

Hi there,

In order to fetch data from the API, you will need to use OAuth as opposed
to basic authentication, which is what you are using in your code. Please
have a look at our quick start https://dev.freeagent.com/docs/quick_startand
OAuth https://dev.freeagent.com/docs/oauth pages for more information on
how to fetch your access token, which you can then specify in an
“Authorization” header.

After that you will have to make a call to
https://api.sandbox.freeagent.com/v2/contactshttps://pulsesolutions.sandbox.freeagent.com/contacts with
the following headers set:

  • “Authorization: ” (this allows us to know which
    account’s data to return)
  • “Accept: application/xml” (you need to specify this so we know in which
    format you want the response)

Let me know if you run into other issues after doing this.

Regards,
IoanOn Monday, April 22, 2013 2:44:01 PM UTC+1, Girish Sarvaiya wrote:

Hello,

I have enabled API Integrations from “API & Feeds” settings but still
unable to get data. Please advise.

Please review sample .net script below.

MSXML2.ServerXMLHTTP objXmlhttp = new MSXML2.ServerXMLHTTPClass();
objXmlhttp.open(“GET”, "
Log in to your FreeAgent account", false, , );
objXmlhttp.setRequestHeader(“Content-Type”, “application/xml”);
objXmlhttp.send(lsUPSXML);
string lsResponseXML = objXmlhttp.responseText;

Thanks.
Girish Sarvaiya