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.

PHP Dev Sample Error 404

Highlighted
New Member

PHP Dev Sample Error 404

Hello,


I've downloaded the development sample for PHP from Constant Contact's website, retrieved the API key and modified simple_form.php and cc_class.php to enable adding a form for subscribers.


 


When I fill in the input fields and click submit, it bounces back with "The requested URL returned error: 400" on the page...help!

 

 

 

 


 


 

2 REPLIES 2
Highlighted
New Member

Error 404 The requested URL returned 404.

I was able to add the http://api.constantcontact.com/ws/customers/myaccount/lists/30


but now returns 404...

Highlighted
Employee

Re: PHP Dev Sample Error 404

It looks like you may have added the an extra form input for the lists, which was causing the generated XML to contain an extra <ContactList id=""/> and producing the 400 error.  Below is the input you would need to remove, which is on line 61 of your attached simple_form.php


<form action="" method="post">

<input type="hidden" name="lists[]" value="" id="" />

David J

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
Featured