cancel
Showing results for 
Search instead for 
Did you mean: 
Memorial Day: In recognition of the Memorial Day holiday, our Support office will be will be closed on Monday, May 29th.

How to generate an API Key and Access Token

Moderator

Typically 3rd-party application developers will have their own API Key which lets their app talk to Constant Contact, however some developers may require you to provide them with your own API Key and Access Token. If you are using an integration that wants an API Key and Access Token, but are just not sure where to find those, then this step-by-step guide is for you.

 

To generate an API Key, you will first need to create or log in to a developer account at https://constantcontact.mashery.com/ This will be separate from your normal Constant Contact account.

 

Once you have created an account and verified the email address (or logged in to your existing developer account), you are ready to register a new app and get an API Key here: https://constantcontact.mashery.com/apps/register

 

  1. Fill out the Application Name field. This should be the name of the application or integration you are connecting your Constant Contact account to.
  2. Ignore all of the other fields and scroll to the bottom of the page.
  3. Check the box indicating you agree to the terms of service (we’re sure you read it all) and click Register Application.

You will then be presented with your API Key information.

 

Now that you have your API Key, you are ready to generate an Access Token. The easiest way to do so is to use our API Tester located here: https://constantcontact.mashery.com/io-docs

 

You should see your API Key pre-filled in the App/Key field.
(If you don't, click the Sign In link at the top right of the page and log in to the Mashery developer account you created earlier. Once you are logged in, the page will refresh and you will see your app and API Key listed there.)

 

  1. Click the gray Get Access Token button


  2. On the window that appears, click the blue I already have an account link


  3. Log in to your Constant Contact account (not your developer account) and click Allow

You will then be provided with your Access Token, which you can now use along with your API Key in your integration!

 

So that you can easily use them where you need to, we recommend you save this information somewhere, such as a Word or text document, however you can always log in to your developer account to see your API Key, and follow the steps above to view your Access Token again.



Was this guide helpful? What other types of information would you like to see guides on? We're happy to help get you the information that you need! Let us know in the comments!

David_B.

Hello, my name is David and I'm a member of our API Support team. I assist developers and customers with integrating with Constant Contact's API.

2 Comments
BSS
Member

Hi, I need to sync email list from constant contact through cronjobs. If I understand right, oauth 2 requires to have a person standing by to click a button to initiate getting token. How to automate this process through cronjobs, since sync will be done at midnight when no person is standing by? 

 

Thank you for your time and attention.

Moderator

Hello BSS,

 

You should be able to authenticate ahead of time and it will save that token for quite a while. Unless you have written your integration to expire those tokens at a specific amount of time they last 315359999 seconds which is 10 years.

 

This time can be changed of course to expire earlier if you wish. You can reference that documentation here. https://developer.constantcontact.com/docs/authentication/access-token-info.html