You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you trace the code, you'll see it ultimately makes a call like <some_api_url>?hapikey=demo when under some circumstances you really should be doing something like <some_api_url>?access_token=demo
demo code below.
<?phprequire_once('lib/haPiHP/class.leads.php');
require_once('lib/haPiHP/class.contacts.php');
$HAPIKey = 'demo';
/* Lead Form Example */$api_endpoint = "http://demo.app1.hubspot.com/?app=leaddirector&FormName=WebstoreOrders";
$leads = newHubSpot_Leads($HAPIKey);
$val = array( 'email' => 'testemail+'.uniqid().'@emailtest.com',
'last_order_datetime' => "Mon Jan 21 15:48:31 EST 2013",
'last_order_date' => "2013.01.21",
'last_order_time' => "15:48",
'last_order_number' => "123",
'last_order_amount' => "15.99" );
echo$leads->add_lead($api_endpoint, $val) . "\n";
/* Contact API Example */$contacts = newHubSpot_Contacts($HAPIKey);
$unique_email = 'testemail+'.uniqid().'@emailtest.com';
$params = array('email' => $unique_email, 'firstname' => 'Webster' );
$createdContact = $contacts->create_contact($params);
print_r($createdContact);
?>
The text was updated successfully, but these errors were encountered:
If you trace the code, you'll see it ultimately makes a call like
<some_api_url>?hapikey=demo
when under some circumstances you really should be doing something like<some_api_url>?access_token=demo
demo code below.
The text was updated successfully, but these errors were encountered: