Sample PHP code for API

Regular Participant

Sample PHP code for API



Ive looked for sample PHP code to call the API to do things like create,modify,delete contacts etc, and I am poitned to sites like github but there seems to be a lot of php code that can't be found - eg. references to include files etc.


Is there any one location where zip files containing all the necessary code for all the different types of API calls one would want to make to access our existing constant contact DB?


Any help appreciated.




What your'e running into is that the PHP library has two dependencies that are managed using Composer (You can find information on Composer here: If you're not familiar with Composer or are simply not using it to manage your project, you can simply download the dependencies by installing composer and then opening a terminal/command prompt and navigating to the folder where you placed the PHP SDK. Once you're in that folder simply type "composer install" into the command line and everything will be downloaded.


Once you've got the dependencies, you can then just copy the contents of the PHP SDK folder and it will have everything that you need.


If you have any questions, please let me know!



Elijah G.
API Support Engineer
Regular Participant

Thanks Elijah


I'll take a look at what you've said.


Appreciate your help.





Developer Portal

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

Visit Page