My goal is to create a new email campaign dynamically using content pulled from our content management system and also include ads from Google Ad Manager.
I have no trouble creating the HTML for the email I want to send, but am struggling using the API to actually send that email.
The code samples provided for v3 of the API use HttpRequest, but that is not available to me, so I converted that to CURL, but now I'm getting a "Not Authorized" message from my test script.
I am working with my web host to hopefully be able to use HttpRequest, but my research is implying that it may be depreciated in my version of PHP.
Any advice would be greatly appreciated!
Hello JasonBusch,
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
The Constant Contact V3 API employs a REST-based resource structure with JSON support for all payloads and HTTP methods for calling endpoints.
Introduction to the V3 API
https://developer.constantcontact.com/api_guide/v3_technical_overview.html
Additionally, applications that integrate with Constant Contact using the V3 API, must use the OAuth2 authorization protocol to securely authenticate a Constant Contact user account, and to be granted access to that user’s data.
You must complete the authorization process and obtain a valid access token i order to make endpoint calls via the API.
OAuth2 Overview
https://developer.constantcontact.com/api_guide/auth_overview.html
Additionally, you can utilize our API Reference tester to test out the functionality of our available endpoints to see how they will work once programmed within your application:
https://v3.developer.constantcontact.com/api_reference/index.html
The request for V3 application code samples is currently under review. However, we're currently still adding endpoints and capabilities to the V3 API, and do not plan to publish official sample apps until that process is complete. Your feedback and experience with this request is essential to improving our product, so thank you for reaching out to us regarding this matter.
In the meantime, here are the example calls that are currently available for V3:
V3 Code Samples:
https://v3.developer.constantcontact.com/api_guide/tag_code_samples.html
Additionally, you can utilize our API Reference tester to test out the functionality of our available endpoints to see how they will work once programmed within your application:
https://v3.developer.constantcontact.com/api_reference/index.html
For additional reference, here is the link to a sample that was created/shared on our Developer Forum by a 3rd party developer (NOT created or supported by Constant Contact) for V3 using PHP:
Please have a look and let us know if you have any other questions!
You can also reach our team directly/securely via email at webservices@constantcontact.com
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up