No activityTYpe specified

Occasional Participant

No activityTYpe specified


Please help. I have been trying to find out whats wrong for the past couple of hours ...


This is the data being posted...but yet the Server responding with error 400 - NO activityTYpe specified....

Any suggestion please ...

I tested your encoded form in my own account by changing just the account name (mylist to my actual account name). In both a C# sample program and our REST debugging tool, it posted a 201 created without issue. The problem most likely is in your actual code doing the submit.
Dave Berard
Senior Product Manager, Constant Contact
Occasional Participant

HI dave,

Thanks for your reply..

Yes ... I tried it on a page and its working fine.

The problem is that I have to do this as an ASP page ...

Here is my ASP code... note however that this has been patched up thru a series of trial and error...
ANd moreover I think if we can crack this ...this can then be of some use to other users of the forum...cause there are other people looking for an ASP equivalent... but unfortunately this is one route /option which does not seem to be popular hence not much information available. But unfortunately I cannot use a .net page for this one.

Note that i am using SV_ADD here to add one record although it should be used normally for BULK Contacts... The Purpose of the page is to do a sort of end of day procedure so sometimes it may happen that there will be just 1 record to update...but normally we expect to have more than 1 per day.

Thanks for looking into this.

Here it goes

=====VBSCRIPT =======
sUsername = "USERNAME"
sPassword = "PASSWORD"
sUri = "" & sUsername & "/activities"
sListUri = "" & sUsername & "/lists/1"

sAuthorisation = sAPIKey & "%" & sUsername

set myRequest = Server.Createobject("Microsoft.XMLHTTP")

sData = "activityType=" & Server.URLEncode("SV_ADD")
sData = sData & "&data=" & Server.URLEncode("Email Address,Email Type,First Name,Last Name"&chr(10))
sData = sData & Server.URLEncode("" & ", HTML, " & "BLAH, BLAH" )
sData = sData & "&lists=" & Server.URLEncode(sListUri)

Call"POST",sUri,False,sAuthorisation, sPassword)
Call myRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
Call myRequest.send

Set myRequest = Nothing

I'm looking over your code and I think I see an issue here. There is no send of the sData variable. The actual function to send the information should be:

Call myRequest.send(sData)

This will send the sData information in the actual request send. I'm unable to test this in my current enviroment, I'm looking to see if I can get a classic ASP test environment set up though to try this out.
Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page