Unable to access company through API

Hi,

I am trying to get setup accessing the API. I have a test account setup with multiple test clients setup within the account.

I am following the steps as outlined in the docs (FreeAgent Developer Dashboard) to try and get an access token and access a company’s data.

When trying to access the company using (we are using the production url to try and access our company):

GET https://api.freeagent.com/v2/company
x-Subdomain: limitedcompanydemo1

I get the response: ‘Api acess is disabled for this company’. And therefore I am unable to access the data.

I have had a search for this error and have found people suggesting to ‘Settings > Api & Feeds > Click enable access’.

However, when I try and do this, there is no Api & Feeds section in the client settings as shown in the image below:

I thought it could be the ‘Connections’ area and ‘Approved Applications’ however it does not seem I have access to this potentially as my user is an accountant with full access rather than the client themselves.

Any help on this would be greatly appreciated!

Thanks!

Hi Dan :wave:

Welcome to our API forum! I’m sorry to hear you’ve had some trouble, and I’ll do my best to help out.

Thanks a lot for your detailed description of the steps you followed so far. I received some additional details about the issue you’re facing from a colleague you’d been in touch with, and, equipped with that, I had a look into our logs to see what may be going wrong. What’s somewhat confusing is that I don’t see any requests to the /v2/company endpoint from your app within the last 48 hours – although I see requests to other endpoints retrieving data for your demo company, e.g. /v2/expenses, /v2/payroll, /v2/accounting/profit_and_loss/summary (all of them successful). Would you mind querying the Company Details endpoint one more time and giving me a timestamp, so I can track it down in our logs?

Best wishes,

Ewa

Hi Ewa,

Thankyou. I believe I am now accessing the Api successfully and getting data back.

Thanks,

Dan

1 Like

That’s great to hear, thanks for the update!