Simple "Sign up for our Newsletter" Submission


Simple "Sign up for our Newsletter" Submission

I'm sure this has been asked before but I just don't see it in the forum.


We have a site that has a "Sign up for our Newsletter" form field with a submit button.


I want to have the email go to Constant Contact once the submit button is clicked.  Then take them to Thank You page saying their signup was successful. Then I guess Constant Contact will send an email to that person to verify their signup.


Can someone please tell us what we need to do?  Is there a sample script that does this?  Where can we get it?


I signed up for an API key but it's not clear how it knows which Constant Contact account to access.  How does this work?


Thank you for your help.






Hi Kevin,


It is absolutely possible to accomplish what you are looking to do, and getting an API key is the first step! In order to connect your application to Constant Contact, you will need your API key and an access token which replaces the username and password. In order to generate these tokens, we implement the OAuth 2 process. For additional information about Authentication, you can check out this article:


For actually creating the form, we do have code libraries available for a number of languages with samples showing how to do things such as creating a contact. You can find those code libraries and samples located here:


With these code libraries, you would have the ability to transmit a contact's email address to Constant Contact while specifying that the action was performed by the contact. This will cause them to be added to the specified list(s) and receive a welcome email.


If you do have any additional questions about using these libraries, please feel free to reach out and we will be happy to provide assistance!

Elijah G.
API Support Engineer
Occasional Participant

I have done all of the steps for signing up and obtaining an API key and when I submit the email I get:


Error Getting Contact By Email Address

    [0] => Array
            [error_key] => mashery.not.authorized.inactive
            [error_message] => The Mashery account associated with this request is not active, or an invalid API key was used.


Why does it say Status: Waiting in the Constant Contact Mahery interface?  See attached image.

Occasional Participant

In case anyone else ever has this problem this is why:


"We have to approve partner API Keys manually. If you are a partner with us, please respond with your API Key (the value) and your partner name with us (what you use to login to the Constant Contact partner console). Sorry for the frustration.


If you're not yet a partner, you can apply for a standard API Key in Mashery (with the same Mashery account you already created) and that will become active within 30 minutes."

Hi Kevin,


I want to start by apologizing for the delay in getting back to you on this! When you apply for partner API access, we do have to manually approve the API key and verify that you do have an existing partnership with Constant Contact as well. However, you can create and use a standard API key freely and they are normally active within 5 minutes(However, it can take up to 30 minutes).


If you have any additional issues with getting up and running, please let us know and we will be happy to assist!


Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page