PHP code example of rtconner / freshbooks-api

1. Go to this page and download the library: Download rtconner/freshbooks-api 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/ */

    

rtconner / freshbooks-api example snippets


$domain = 'your-subdomain'; // Do not ken found in your account
$fb = new Freshbooks\FreshBooksApi($domain, $token); 

// Method names are the same as found on the freshbooks API
$fb->setMethod('client.list');

// For complete list of arguments see FreshBooks docs at http://developers.freshbooks.com
$fb->post(array(
    'email' => '[email protected]'
));

$fb->request();

if($fb->success()) {
	echo 'successful! the full response is in an array below';
	var_dump($fb->getResponse());
} else {
	echo $fb->getError();
	var_dump($fb->getResponse());
}