Thanks for your reply..
Yes ... I tried it on a Vb.net 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
sUsername = "USERNAME"
sPassword = "PASSWORD"
sUri = "http://api.constantcontact.com/ws/customers/" & sUsername & "/activities"
sListUri = "https://api.constantcontact.com/ws/customers/" & sUsername & "/lists/1"
sAPIKey = "APIKEY"
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("email@example.com" & ", HTML, " & "BLAH, BLAH" )
sData = sData & "&lists=" & Server.URLEncode(sListUri)
Call myRequest.open("POST",sUri,False,sAuthorisation, sPassword)
Set myRequest = Nothing
... View more
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 ...
... View more