The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

The remote server returned an error: (400) Bad Request.

New Member

The remote server returned an error: (400) Bad Request.


I am coding in VB.NET and I am using Constant Contact API to add a contact to a particular list. When I got the above error I have looked into the forum for the potential solution and modified my VB code as per the suggestion of the tech manager of Constant Contact but still I am getting the same error. Can I get any help to sort this out? And the error is piointing to this particular line ...

Using response As HttpWebResponse = TryCast(request.GetResponse(), HttpWebResponse)


As I am getting very much problem of copy and pasting my code in the text box, I have attached that code as a text file.

Please help me out of this problem.










Re: The remote server returned an error: (400) Bad Request.

I did want to let you know that if your typical flow is to add one contact at a time, you would need to use our Contacts Collection to Create a Contact. You can find examples of how to do this in our C#.NET sample code located on our Code Samples page.


Regarding the sample code you posted, this did successfully create an add contact activity in my account which finished with no errors. The only thing I can think of that would cause an error for you and not for me would be if you do not have a list id of 9. If you'd like to give the username of your account, I can certainly confirm this.

David J

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More