API Keys

 

What's an API Key?

An API Key is a value passed in by applications calling our API (application programming interface) to identify the integration making the call. An API Key is required to use the Constant Contact API.

  • DO Each integration should only use one API Key.
  • DO Different applications should use different API Keys.
  • DON'T Never make your users generate their own API Keys to use with your application.
  • DON'T Do NOT create a unique API Key for each user. Each API Key can and should be used for multiple Constant Contact accounts. Access tokens are unique, and you should use the OAuth2 process to generate tokens for your users automatically.

Not a Developer?

If you're using an integration that's requiring you to enter your own API Key, please ask the company or developer that build the integration to use their own API Key for all of their users, to avoid this unnecessary work. If you'd like to create your own key so that you can use that integration immediately, feel free to use the steps below, keeping in mind that it's meant for developers. You can enter your company's information as much as possible (e.g. "Application Name" can be your company name), and enter "N/A" for anything you're unsure of.

 

Getting an API Key

Here's how to get an API Key for your integration:

  1. Sign up for a Mashery account or log in.

  2. Confirm your account, if it's new - 
    Check your inbox for a confirmation email from Mashery.

  3. Register an Application - 
    An API Key will be assigned to your application.

  4. Get an access token - 
    Fill your API Key into this page (if it's not already filled in) and click G
    et Access Token.

    Getting an access token requires a Constant Contact account. When you click Get Access Token, you are taken to a Constant Contact account sign up page. Create a new account, or if you have an existing Constant Contact account (NOT your Mashery developer account), sign in.  

    Click Grant Access to generate an access token. Copy it and keep it handy.

Types of API Keys

There are two types of API Keys:

API Key Type Description Rate Limits
Standard API access Provides access to public Constant Contact API endpoints

4 calls per second

10,000 calls per day

Partner API access Provides access to all public endpoints plus all Partner-only endpoints. Partner API Keys are only available to Constant Contact Partners, and are approved on a case-by-case basis. Learn more about partnering with Constant Contact. 

20 calls per second

250,000 calls per day

About the redirect URI

First, if you are building an application that will access only one Constant Contact account, you do not need to worry yourself about them! Fahgettaboudit!

If you are building an application that will be used by many Constant Contact accounts owners, you will be using a redirect uri along with your API key and client secret in the OAuth 2.0 authentication flow. When you registered your application and got an API key, a default redirect_uri of http://localhost was assigned to the app. You can modify the redirect_uri in API Keys > Applications when you're logged into your Mashery account. 

Managing your API Keys

Once you are signed up and logged into Mashery, you will be able to:

  • Manage and view each API Key and its consumer secret & redirect URI.
  • Create new API Keys.
  • Change your email address, company name, blog and website URLs.
  • View usage statistics for each application

Allow about 5 minutes for changes you make to API Keys in Mashery to be active in Constant Contact.

API rate limit notifications

You will receive email notification for the following rate limit conditions:

  • When your app starts approaching the daily call limit
  • When your app reaches the daily limit - at that point the API Key will not be able to make calls until 12:00 am the next day.