The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

V1 API code not working on prod server

Occasional Participant

V1 API code not working on prod server

Hi there,


I've inherited a project that is using some old code using the v1 API. The weird thing is that this test code works on my laptop, a dev server, but not on the production server.  Before I go to the server administrators I was hoping that someone could check out this code for any possible problems. The server that it's on is a locked down server that is managed for PCI compliance, so they are very concious about security. Anything that comes to mind from a server standpoint?


TIA, Mark

Occasional Participant

Re: V1 API code not working on prod server

I should add that $response var is false when I try and run it.


Also I realized that I uploaded a code file that had some stuff commeneted out that I meant to have in, this is the one I'm running.



Honored Contributor

Re: V1 API code not working on prod server



After reviewing your code, the first thing that I would suspect that is a server related issue is that the SSL root certificates for the production server are out of date. I have seen cases where this can cause Constant Contact's SSL certificate to appear invalid, thus causing any cURL requests that use SSL to fail.


Beyond that, you can try getting more information about the error back from cURL and see if there is an error message that you can use. in PHP this can be done using curl_error().


Best Regards,

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More