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
I want to remove contact from contact list . I have used this code and it will respond me "Bad Request" message
Code:
$cc = new \Ctct\ConstantContact(WPYog_APIKEY);
$ca = new \Ctct\Services\ActivityService(WPYog_APIKEY);
$contact = $cc->contactService->getContacts(WPYog_ACCESS_TOKEN, array("email" => 'psudhir1220@gmali.com'))->results[0];
try {
$ca->addRemoveContactsFromListsActivity(
WPYog_ACCESS_TOKEN,
array($contact->email_addresses[0]->email_address),
array($contact->lists[0]->id)//List Id from which you want the contact to be removed from
);
print_r($ca); exit;
$returnContact = $cc->contactService->updateContact(WPYog_ACCESS_TOKEN, $contact);
} catch (Exception $e) {
var_dump($e->getMessage());
}
I want to remove contact from contact list . I have used this code and it will respond me "Bad Request" message
Code:
$cc = new \Ctct\ConstantContact(WPYog_APIKEY); $ca = new \Ctct\Services\ActivityService(WPYog_APIKEY); $contact = $cc->contactService->getContacts(WPYog_ACCESS_TOKEN, array("email" => 'psudhir1220@gmali.com'))->results[0]; try { $ca->addRemoveContactsFromListsActivity( WPYog_ACCESS_TOKEN, array($contact->email_addresses[0]->email_address), array($contact->lists[0]->id)//List Id from which you want the contact to be removed from ); print_r($ca); exit; $returnContact = $cc->contactService->updateContact(WPYog_ACCESS_TOKEN, $contact); } catch (Exception $e) { var_dump($e->getMessage()); }