01-31-2011 05:32 PM
I am trying to add new contact into Contact List through using c# sample code. I am able to get Contact list and when i try to add new contact into existing optin list then it throw error "The remote server returned an error: (400) Bad Request"
Here is the request which i am sending it
<title type="text" />
Please let me know what is the issue?
02-01-2011 07:20 AM
Your XML looks like it is meant to create a single contact (email@example.com) rather than a Contact List itself. In order for the XML above to create a contact, you would just need to modify your <ContactList> id to use the list id rather than the name of the list.
You can find the id of any of your lists from the Lists collection.
I hope this helps, please let me know if you have any questions or concerns regarding this. Thank you.
02-01-2011 04:56 PM
Thanks for reply, Today i am trying to run my application again but i am getting error "The underlying connection was closed: The connection was closed unexpectedly."
Same code was working yestarday, Please let me know what is the issue
My Login Account Id = AcuityTest
02-02-2011 07:17 AM
Yesterday our API servers were temporarily down for a period between 12:50pm and 6:00pm. During that time you would have received errors such as that.
It should be working fine now, if you are still running into issues after this, please let us know here.
01-05-2012 03:49 AM
I'm getting 400 Bad request error when I using POST method to add new contact. Here is my XML:
What am I missing?
01-05-2012 08:11 AM
What is the URL that you are POSTing the information to? Also, is there any body returned with your 400 error?
I would also suggest that you take a look at running RESTclient. You can run the same XML through this program, then if you receive the same error, you can save your request as a .RCQ file and email it to firstname.lastname@example.org for us to take a look at.
Let me know if you have any questions. Thanks!
01-05-2012 10:58 PM
Thanks for help from you.
I using https://api.constantcontact.com/ws/customers/hienb
01-08-2012 11:38 PM
I'm trying to add new contact into Contact List A, but this contact had existed in Contact List B through using c# sample code. So, it appear error 409
How do to solve this issue?
01-09-2012 09:24 AM
Once a Contact is created, all subsequent changes must be done using update requests. In the C# wrapper, this should be done using updateContact() method in the Utility. You would need to do a getContact request by either the ID or the Email Address and then update the Contact to change their information.
Senior Product Manager, Constant Contact