Simple hello world api example

Hi all.

I am an experienced programmer in the process of using the FreeAgent API to interrogate outstanding invoices.

I am struggling to grasp the FreeAgent authentication required to access my live FreeAgent account.

Can someone please supply some sample code for hello world example such as count the number of overdue invoices or point myself to some online sample code. So that I can understand the steps required for authentication to my live FreeAgent accounts. The example code can be in Python, PHP or java.

Also which is the best language to access the FreeAgent API.

Thanks in advance.

Hi Arshad,

Ewa here from the Engineering Team at FreeAgent — thanks for your message on our forum and I’ll do my best to help out.

The FreeAgent API uses OAuth 2.0, which is the industry-standard protocol for managing authorisation. You can read about our implementation of it here in our docs. We also have a Quick Start guide which will walk you through setting up a test app and making sample requests using the Google OAuth 2.0 Playground — hopefully this should help you familiarise yourself with our authentication flow. Alternatively, if you prefer a tool like Postman, we have shared an importable collection of sample requests on Github here.

You can integrate with our API using any language that will allow you to make standard HTTP requests. I’m afraid we don’t have any official demo apps in the languages your mention, but a quick search through Github brings up a number of public projects by members of our API community which will handle authentication:

I hope this helps!

Best wishes,

Ewa