I cant seem to find my error. I am trying to create a list. I have followed the API at http://developer.constantcontact.com/doc/contactLists#create_list, but still do not seem to be able to create the list. I believe it is in the construction of my XML string. I suspect a small oversight. But when I execute the code in the attached file, all I get is: The remote server returned an error: (400) Bad Request. Any help or insights would be appreciated.
I am using VB.net and have attached my code in the enclosed text file. I tried to copy and paste the code right in to this post, but it kept pasting incorrectly, hence the attachment.
Looking at your XML, there were only a few things I needed to modify to get this to successfully create a new list.
1. Add quotes around application/vnd.ctct+xml in your opening <content> tag.
2. Remove </Contact> from your XML as this node is never opened and is not required for creating a contact list.
You can find an example of the XML that would need to be posted in order to create a new list under Creating a New List. I hope this helps to clear up any points of confusion.
I knew it was simple. I tried for 2 days to get this fixed. I guess I was to close to it and could not see the forest for the tress.
Again, Thank 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