PHP code example of lecompteanytime / api-php-sdk

1. Go to this page and download the library: Download lecompteanytime/api-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lecompteanytime / api-php-sdk example snippets


composer 

try {
    $token = $client->generateToken();
    echo $token;
} catch(ApiClientException $e) {
    echo 'ERROR: ' . $e->getMessage();
}

$accountListApi = $client->api()->accountList();
$request = $accountListApi->createRequest();

try {
    $response = $accountListApi->sendRequest($request);

    foreach($response->getAccounts() as $account) {
        echo $account->getAccId() . ' - ' . $account->getAccType() . "\n";
    }
} catch(ApiClientException $e) {
    echo 'ERROR: ' . $e->getMessage();
}