# Simple hello world api example

**URL:** <https://api-discuss.freeagent.com/t/simple-hello-world-api-example/1979>\
**Category:** Authentication\
**Created:** [12 April 2020 13:15 UTC](https://api-discuss.freeagent.com/t/simple-hello-world-api-example/1979 "2020-04-12T13:15:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arshad](https://api-discuss.freeagent.com/letter_avatar_proxy/v4/letter/a/b9e5f3/32.png) [@Arshad](https://api-discuss.freeagent.com/u/Arshad)\
**Post date:** [12 April 2020 13:15 UTC](https://api-discuss.freeagent.com/t/simple-hello-world-api-example/1979/1 "2020-04-12T13:15:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ewa\_Lipinska](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/ewa_lipinska/32/235_2.png) [@Ewa\_Lipinska](https://api-discuss.freeagent.com/u/Ewa_Lipinska)\
**Post date:** [13 April 2020 14:34 UTC](https://api-discuss.freeagent.com/t/simple-hello-world-api-example/1979/2 "2020-04-13T14:34:15Z")

</div>

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](https://dev.freeagent.com/docs/oauth). We also have a [Quick Start guide](https://dev.freeagent.com/docs/quick_start) 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](https://www.postman.com/), we have shared an importable collection of sample requests on Github [here](https://github.com/fac/postman-freeagent-api-collection).

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:

> **[Build software better, together](https://github.com/search?q=freeagent%2Bapi&type=Repositories)**
>
> GitHub is where people build software. More than 50 million people use GitHub to discover, fork, and contribute to over 100 million projects.

I hope this helps!

Best wishes,

Ewa
