Hey James,
Thanks. I am trying to use the activities api method but I'm running into a "400" error. Here is my code:
$call = https://api.constantcontact.com/ws/customers/USERNAME/activities;
$parameters = "activityType=SV_ADD";
$parameters .= "&data=";
$csvContacts = "Email Address, First Name, Last Name,";
$csvContacts .= "xxx1@example.com, First1, Last1,";
$csvContacts .= "xxx2@example.com, First2, Last2";
$parameters .= urlencode($csvContacts);
$parameters .= "&lists=".urlencode( 'http://api.constantcontact.com/ws/customers/USERNAME/lists/1');
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $call);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt ($ch, CURLOPT_USERPWD, APIKEY%USERNAME:PASSWORD);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FAILONERROR, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS , $parameters);
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded"));
$emessage = curl_exec ($ch);
... View more