API wrapper for figo Connect.

Installs: 14 096

Dependents: 0

Suggesters: 0

Stars: 26

Watchers: 17

Forks: 10

Open Issues: 1

1.1.5 2015-12-28 21:48 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) {


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.