How to get an API access key

Hi,

I would like to implement some functionaly that will import a bunch of invoices, receipts and other files to my FreeAgent accounts. I am developing a small backend application (not so much a webapp really).

I can see that that there is OAuth integration, but this require setting up an application in FreeAgent and granting access to that application from your accounts (I have multiple companies). All I’d like to do is just to implement a basic file uploader for these files (in Java).

What’s the easiest way to get the API access keys and is it really not possible to create these keys through your company’s account?

Also, am I right in my understanding that there is no way to organize uploaded files in directories?

Please, advise!

Kind regards,

Martin

Hi Martin,

Thanks for posting to the forum for the first time, I hope I can provide some useful guidance. Firstly on your API/authorisation question: unfortunately for you, we only provide the Authorization Code flow for OAuth 2, which means we expect the application to direct the user to sign into their account to get a token.

You could do this via a Java uploader, but that will require you to spin up a browser view to do the exchange. I don’t know the modern Java ecosystem well enough to suggest a library for this.

I understand this isn’t ideal, but we don’t support trusted code flows (like proof key for code exchange/PKCE), so there is no way of generating these keys for an individual company account. If that doesn’t work, we do have supported data entry integrations that may be able to do what you want, though you will need to pay for these.

For your question about file management: again, you are correct that we don’t offer directory management for files for your company. We think of it as a handy place for directly relevant uploads while you’re working on your accounts, rather than a full blown company file management system. Which is why we’ve not built many organisational features.

If you’d like, I can raise the suggestion of directories as a feature request internally?

I hope that helps, and sorry I couldn’t answer more positively! Thanks for reaching out on the forum.

James

Engineering Manager
FreeAgent Ltd