Get removed contacts


Get removed contacts

I'm using this wrapper:


Is there way to get a list of removed contacts? 




The best way to get a list of removed contacts in our API is to get a list of "list members" from the removed list.  Unfortunately, in the wrapper, when using the "getLists" function, it ignores the Active, Removed, and Do Not Mail lists.  So that when you do the getListMembers function, you cannot pick the removed list.


The work around to this would be to edit the Collections.php file and go to the getLists function, and take out the Removed list from the ignoreArray array.  Then when you do a getLists, it will show the removed list as list "0".  You would then be able to get the list members from that list.


After removing "removed" from the array, here is the code that I used that worked:


    include_once ("ConstantContact.php");
    $ConstantContact = new ConstantContact('basic', "API KEY", "USERNAME", "PASSWORD");
    $lists = $ConstantContact->getLists();
    $members = $ConstantContact->getListMembers($lists['lists'][0]);
    print_r ($members);


If you have any questions please let me know.




Ben Soder

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page