This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Description
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());
}