Attempting to add a user to a list after they have been previously culled gives an error

Occasional Participant

Attempting to add a user to a list after they have been previously culled gives an error

We had a list that was imported into Constant Contact a few months back.  The majority of that list was then culled out by Constant Contact, down to a very small list of users.  We want these culled users to be able to register again, should they so choose, however, doing so throws the following error:


Error 403: Contact has opted-out and may not resubscribe


We did not cull these addresses, so we have no idea how they're sitting in the system currently.  Repeated phonecalls have said "it has to do with the feed from the API on your site", which is not helpful. I was previously directed to email my question, though it has not been answered.  I have since been directed to raise the question here.


What do I need to change in my XML to allow these users to sign up again, if they so choose?




You are getting a 403: Forbidden error because the OptInSource you are passing in with your XML is using your Action_By_Customer.  This would be the same error you would get if you tried to add them back into your account.  If this is going on your web-site you can set the OptInSource to Action_by_contact and it will allow your contact to subscribe back to the account.


Let me know if that helps.

Ryan Davis
Quality Engineer
Occasional Participant

Setting OptInSource to Action_By_Contact returns:


Error 400: Contact must include OptInSource


However, dumping the XML before submission shows that <OptInSource> is indeed Action_By_Contact

Occasional Participant

Disregard the previous post.  I'm now trying to edit the contact, rather than add, which I was doing on accident previously. Here's what I've done so far:


I've queried for the contact by email address.  Once I get the contact details, I edit Status to "Active" and OptOutSource to "Action_By_Contact" and PUT the information back.  I'm once again getting "Error 403: Contact has opted-out and may not be resubscribed"


So, editing the user and changing the OptOutSource doesn't seem to work for me either.

Hey Michael,


Please check out my example below, it uses our new php wrapper.


 * 		Please note that this is just an example, please change the credentials to
 * 		your own constant contact login credentials.  The following code is an example of:
 * 		Search for contact by email address
 * 		Creating a new contact if it doesen't already exist
 * 		If Contact exists, then update the contact by adding it to a new list

// this application uses our new wrapper that can be found on github

include ('ConstantContact.php');
	// Connecting to your account
	$ConstantContact = new ConstantContact("basic", "apikey", "username", "password");

	// Get potential contact lists
	$lists = $ConstantContact->getLists();
	// Lists are returned in multidimentional arrays 0 being the list, and 1 being the next50
	// Email address here is used for testing purposes
	// NOTE:  This email address will be added to your account if you execute this script,
	//		  you should send this to do-not-mail after your testing
	$emailAddress = "";
	// Search for our new Email address
	$search = $ConstantContact->searchContactsByEmail($emailAddress);
	// If the search didnt return a contact object
	if($search == false)
		// Create a new Contact Object to store data into
		$contactObj = new Contact();
		// Adding multiple lists to this new Contact Object
		$contactObj->lists = array($lists['lists'][0]->id, $lists['lists'][1]->id);
		// Set the email address
		$contactObj->emailAddress = $emailAddress;
		// Create the Contact and DONE
		$Contact = $ConstantContact->addContact($contactObj);
	} // Otherwise we update our existing
		echo "you are already subscribed";
		// Gather data from our previous search and store it into a data type
		$contactObj = $ConstantContact->getContactDetails($search[0]);
		// We need to get the old list and add a new list to it as
		 //this request requires a PUT and will remove the lists
		// as they are stored in an array
		array_push($contactObj->lists, $lists['lists'][3]->id );
		// Update the contact and DONE
		 $UpdateContact = $ConstantContact->updateContact($contactObj);
		 echo "<pre>";
		 print_r($contactObj); // see if it was removed or not
		 echo "</pre>";



Ryan Davis
Quality Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page