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

Get Bad request when we remove contact #154

@shidhu40

Description

@shidhu40

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions