The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Output Subscriber list to a private website

New Member

Output Subscriber list to a private website

Hello, I would like to create a page on my website that displays a particular contact list. This page will be password protected. Is there a pre-written script that accomplishes this? If not, how can I call a Constant Contact database from my website? I have a script that accomplishes the same task but it calls for a database that is on my own server. it looks like this. Am I able to reconfigure this to work with a constant contact database? Thanks!


@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM theManors";



echo "
Database Output


while ($i < $num) {


echo "




Id Sal. First Name Last Name Street City Province Postal Code Phone (D) Phone (E) Source Type Email
$id $salutation $firstName $lastName $street $city $province $postCode $phone $evePhone $source $type $email

Re: Output Subscriber list to a private website

You can certainly output the contents of a contact list through your website. You can obtain general information about a specific list by Retrieving an individual list. If you're looking to display each member of that list (which it sounds like you are), you would want to look at Obtaining subscribers in a contact list. Unfortunately we don't have this exact script written up, but you can get a fair way through what would be needed to implement this by looking at our Code Samples page.

In essence, you're looking to perform an http get on{user-name}/lists/{list-id}/members. Once this information is retrieved you would loop through each returned entry and use that to populate your $firstName, $lastName, $city..etc variables. Be aware that this will only return a maximum of 50 contacts per page, and further pages will be available be access the link in the <link> node w/ the relative attribute 'next'. For example:

<link href="/ws/customers/{user-name}/lists/{list-id}/members?next=gilznato-ftfj0w" rel="next"></link>

I hope this help, please let us know if you have any other questions or concerns regarding this.

David J

New Member

Re: Output Subscriber list to a private website

Thanks for your quick respone! I will give this a try.



Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More