API wrapper for figo Connect.

Installs: 5 975

Dependents: 0

Stars: 22

Watchers: 13

Forks: 8

Open Issues: 3

Language: PHP

1.1.3 2014-07-21 11:44 UTC


PHP bindings for the figo Connect API:


First, you've to add this to your composer.json dependencies:

"require": {
  "figo/figo": "1.*"

and run

composer update

Now you can create a new session and access data:

require_once "vendor/autoload.php";

use figo\Session;

$session = new Session("ASHWLIkouP2O6_bgA2wWReRhletgWKHYjLqDaqb0LFfamim9RjexTo22ujRIP_cjLiRiSyQXyt2kM1eXU2XLFZQ0Hro15HikJQT_eNeT_9XQ");

// Print out list of account numbers and balances.
$accounts = $session->get_accounts();
foreach ($accounts as $account) {

// Print out the list of all transaction originators/recipients of a specific account.
$account = $session->get_account("A1.1");
$transactions = $account->get_transactions();
foreach ($transactions as $transaction) {

It is just as simple to allow users to login through the API:

require_once "vendor/autoload.php";

use figo\Session;
use figo\Connection;
use Eloquent\Liftoff\Launcher;

$connection = new Connection("<client ID>", "<client secret>", "");

function start_login() {
    $launcher = new Launcher;

function process_redirect($authorization_code, $state) {
    // Handle the redirect URL invocation from the initial start_login call.

    // Ignore bogus redirects.
    if ($state !== "qweqwe") {

    // Trade in authorization code for access token.
    $token_dict = $connection->obtain_access_token($authorization_code);

    // Start session.
    $session = new Session($token_dict["access_token"]);

    // Print out list of account numbers.
    $accounts = $session->get_accounts();
    foreach ($accounts as $account) {

You can find more documentation in the doc/ folder.


In this repository you can also have a look at a simple console (console_demo.php) and web demo (web_demo/). While the console demo simply accesses the figo API, the web demo implements the full OAuth flow.