I have tried https://github.com/HubSpot/haPiHP library which did not work out for me.
require_once "haPiHP/class.contacts.php"; $HAPIKey = "cbxxxxea-xxxx-xxxx-xxxx-xxxa8axxxx98"; $contacts = new HubSpot_Contacts($HAPIKey); $contacts_recent_batch1 = $contacts->get_recent_contacts(''); echo "<pre>"; print_r($contacts_recent_batch1); echo "</pre>";
Above code returns an empty array.
EDIT: above code works when I have
$HAPIKey = 'demo';