I have written as
<?php
require_once 'HarvestAPI.php';
/* Register Auto Loader */
spl_autoload_register(array('HarvestAPI', 'autoload'));
$api = new HarvestAPI();
$api->setUser( "nida.amin@gmail.com" );
$api->setPassword( "aaabbb12345" );
$api->setAccount( "heavenscompany" );
$api->setRetryMode( HarvestAPI::RETRY );
$api->setSSL(true);
$result = $api->getClients();
foreach( $result->data as $client ) {
if( $result->isSuccess() ) {
echo $client->get( "name" );
echo $client->details;
}
}
?>
I am very new to Harvest API. Please help me how to get other contact details of the client like email, mobile no's, office...etc in Harvest API in php?
You might find the email address in the client details. Try the following:
var_dump($client->details);die();
Then you should get an output of what is in the details variable. Hopefully it will be an array and you can extract the email address out of it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.