We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

An Error Occurred

Regular Participant

An Error Occurred


Ive tried using the sample forms and ive only changed the username api key etc. but when i try to add a user I get a An Error Occurred message with no further details. It lists the contacts that I have, im just unable to add any.

Occasional Participant

I too have experienced this 'helpful' error - what on earth does this pertain too? I'm angry that a developer could see fit to just output an unknown error code - that shows a massive lack of understanding of their own code and is a PITA for us to work with.

Anyway, rant aside, @marc, I'm gonna have a play with this and if I have any luck I'll let you know.

Occasional Participant

First step is to change $curl_debug = true in cc_class.php - this then indicates a '400' error.

Further sniffing around the forum indicates it can often pertain to incorrectly specifying a list/group of lists to add the user to. I'm still playing to see if I can fix it.



I apologize for the issue that you are having. A 400 error usually means that the XML that you are posting has some error in it.

Could you please paste the XML here so that I can look at it and see if the issue lies with the XML being sent to our server.


Benjamin Soder
NOC Analyst
Constant Contact

I am getting this same error by using the sample simple form. Was there ever a fix for this?

Hey Becky,

This typically happens when there is no list selected when you are working with the sample forms.  If your lists are not displaying you should check the cc_class.php.  It should be set up similar to this:


var $login = 'enter your username here'; //Username for your account
        var $password = 'enter your password here'; //Password for your account
        var $apikey = 'enter your api key here'; // API Key for your account.
        var $contact_lists = array(); // Define which lists will be available for sign-up.
        var $force_lists = false; // Set this to true to take away the ability for users to select and de-select lists
        var $show_contact_lists = true; // Set this to false to hide the list name(s) on the sign-up form.
        // NOTE - Contact Lists will only be hidden if force_lists is set to true. This is to prevent available checkboxes form being hidden.
        // FORM OPT IN SOURCE - (Who is performing these actions?)
        // ACTION_BY_CUSTOMER - Constant Contact Account holder. Used in internal applications.
        // ACTION_BY_CONTACT - Action by Site visitor. Used in web site sign-up forms.
        // DEBUGGING
        var $curl_debug = false; // Set this to true to see the response code returned by cURL
        var $requestLogin; //this contains full authentication string.
        var $lastError = ''; // this variable will contain last error message (if any)
        var $apiPath = 'https://api.constantcontact.com/ws/customers/'; //is used for server calls.
        var $doNotIncludeLists = array('Removed', 'Do Not Mail', 'Active'); //define which lists shouldn't be returned.

 Please let me know if this helps.

Ryan Davis
Quality Engineer
Developer Portal

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

Visit Page