Connect Power BI directly to FreeAgent data - no clear guidance found

Hi. I want to be able to have live query on my Freeagent data so I can create custom business reports using the data, in Power BI. I would also be open to doing this with Tableau but this seems to be more complex than with Power BI.

I’m fairly new to APIs so I’m certain I’m missing something simple, however, the documentation, while comprehensive, totally lacks sufficient guidance (e.g. step by step) on how you would initially set up a direct query connection between FreeAgent and PowerBI.

I’ve spent a long time in the documentation and also on Google but still no proper success.

I have got to the point in Sandbox where I connect to the API URI (https://api.sandbox.freeagent.com/v2/company) using the “Basic method” with “Web” data, and I am providing my FreeAgent username and passwork. However, it only returns text that is on the freeagent home page (i.e. literally what is on the FreeAgent home/login page) so clearly the API is not logging in to my FreeAgent account.

I’ve tried both “Web” and “OData” connectors in Power BI and have had most success with “Web” (it seems they are identical - are they?)

I have also tried using other target URLs such as https://api.sandbox.freeagent.com/v2/bank_accounts to see if I could query bank account data, but that just results in an error.

What I’m missing and unable to find is what I’m sure is a very simple step by step process on the process for connecting to the API in Power BI.

So if anyone has done this successfully I’d be very grateful if you could outline hwo you make the connection to the api within Power that successfully lets you access the secure data in your FreeAgent account.

Many thanks in advance.

Since the API uses Oauth2 as authentication flow with a refresh code its likely that you will need to get a custom connector for FreeAgent inside PowerBI.

If python is more your route then there is this open source FreeAgent Python API which uses the Oauth2 flow.
However you will need a domain to be available to grab the refresh code.

Inutt / Python FreeAgent API · GitLab.