PHP Dev Sample Error 404

apdev1
Occasional Participant

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
apdev1
Occasional Participant

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


but now returns 404...

David_J
Employee

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