WARNING
The Express Forms plugin has been discontinued. Please see the Freeform migration guide for more information.
Pro
Constant Contact Mailing List API IntegrationThis documentation page assumes you have read over the API Integrations overview page. If you have not yet read it, please do so now. We also assume that you have a Constant Contact account already. This integration requires that you have Express Forms Pro edition. If you currently have Express Forms Lite, you can purchase an upgrade to Express Forms Pro inside the Craft Plugin Store.
TIP
This integration requires that your site uses HTTPS for the OAuth authentication.
Overview
This integration includes support for the following:
- Field mapping to standard and custom fields.
- Birthday field types are currently not available.
Setup
Follow the instructions below to setup Constant Contact for Express Forms.
- Prepare Express Forms for Integration:
- Go to API Integrations section inside Express Forms (Express Forms -> Settings -> API Integrations).
- Click on the Setup button for Constant Contact.
- Copy the URL of that page from the browser to your clipboard, e.g.
https://hammer.time/admin/express-forms/settings/api-integrations/constant-contact
and save it for use in a couple mins.
- Create an App in Constant Contact to connect:
- Open another browser tab and go to the Constant Contact website and log into your account.
- The integration requires you create a Constant Contact App. They don't appear to make it easy to find, so you'll want to click this link to get there (from the API website:
https://v3.developer.constantcontact.com/
). - Click on the New Application button at the top right.
- Fill out the form presented, and click Save.
- In the next settings page loaded, paste the URL you copied from the Express Forms Constant Contact integration setup into the Redirect URI field in Constant Contact.
- Proceed to fill out the rest of that settings page as you wish, or come back to it later.
- Click the Save button at the top right.
- Click back into the Constant Contact app to get API key and secret:
- Copy the token in the API Key field to a text editor somewhere.
- Click the Generate* Secret button beside it, and copy the token it generates to your text editor.
- Setup Integration on your site:
- Go back to your Craft CP browser tab.
- In the Constant Contact setup page, do the following:
- Paste the Constant Contact API Key value into the API Key field in Express Forms.
- Paste the Constant Contact Secret value into the Secret field in Express Forms.
- At the top right corner of Express Forms page, click the Save button, which will return you to an OAuth page.
- If you get an error, you may need to wait up to 10 minutes before trying this again from the time you created the Constant Contact app.
- Allow/authorize the request. You'll be returned back to API Integrations page.
- Verify Authorization:
- Confirm that the integration is highlighted in green with status of Active.
- That's it! You can now use this integration inside the Form Builder to map fields.
Config File
Using the express-forms-integrations.yaml
config file (in your Craft /config/
directory), you can setup API integrations directly in a file, allowing you to have different settings for different server environments, etc.
The Constant Contact integration in the config file would look something like this:
Solspace\ExpressForms\integrations\types\ConstantContact:
apiKey: FAKE6d6s-s4f7-6gs8-a43c-sd59675dh7s5
secret: FAKE98g7f79Ddsc50Mdsv6
accessToken: FAKEgs987d92Ggfdds68kjhHK8ze
refreshToken: FAKE9sf8fgJDfds6f8dsfosDFdf97sdhkvkhslfd3Y
2
3
4
5