I just started using the Basic Samples API to create a easy First Name & Email Address add to contacts form. I understand how to set the code up but I'm getting a "The requested URL returned error: 400 " on the form page before i even submit any content. I have read over some for the post reguarding this issue and have not had any luck correction the problem.
To Trouble shoot the problem i even downloaded the REST Client 2.3 and followed your instuctions on how to use it. This is the message i got.
Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.
here are my settings:
// FROM HERE YOU MAY MODIFY YOUR CREDENTIALS
var $login = 'crossrds'; //Username for your account
var $password = 'xxxxxxx'; //Password for your account
var $apikey = '8cb94759-XXXX-XXXa-XXXX-9237ef47e817'; // API Key for your account.
// CONTACT LIST OPTIONS
var $contact_lists = array('KitchenCatering'); // Define which lists will be available for sign-up.
var $force_lists = true; // Set this to true to take away the ability for users to select and de-select lists
var $show_contact_lists = false; // Set this to false to hide the list name(s) on the sign-up form.
// NOTE - Contact Lists will only be hidden if force_lists is set to true. This is to prevent available checkboxes form being hidden.
// FORM OPT IN SOURCE - (Who is performing these actions?)
var $actionBy = 'ACTION_BY_CONTACT'; // Values: ACTION_BY_CUSTOMER or ACTION_BY_CONTACT
// ACTION_BY_CUSTOMER - Constant Contact Account holder. Used in internal applications.
// ACTION_BY_CONTACT - Action by Site visitor. Used in web site sign-up forms.
var $curl_debug = true; // Set this to true to see the response code returned by cURL
Any help would be appreciated.
A 400 error is usually an indication of a problem with the content or structure of your XML. In order to troubleshoot this, could you please show us the XML that you are using to create a contact? If you are using our php sample pack, you could also show us the page/form that you created which is using the 'addSubscriber' and 'createContactXml' functions if you are using them.
If you would prefer to not post the code on this forum, please feel free to send an email to our webservices support team with that information and I would be happy to review your code and get back to you.
View API documentation, code samples, get your API key.Visit Page
We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...Read More