Having Trouble Creating List

Highlighted
Occasional Participant

Having Trouble Creating List

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.


Thanks, Bill


 

2 REPLIES 2
Highlighted
CTCT Employee

Looking at your XML, there

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.

David J

Highlighted
Occasional Participant

Exactly What I needed, Thanks!

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.


Bill

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

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
Featured