Dreaded 404 error

Participant

Dreaded 404 error

 I've been struggling with this for two days. No matter what I do I always get a 404 error when trying to authenticate/connect. I've tried using the RESTClient with the same results. Below is one of the code samples I been trying. Is it possible something is wrong with my account? I've tried browsing straight to the URL https://api.constantcontact.com/ws/customers/myaccountname, enter my login details and login successfully but everything I try /lists  /activities ,etc.. always gives me a 404.


 


I'm using the same username/password that I log into www.constantcontact.com correct (of course I add the apikey + % to the beginning for the api) ?


 


 


Uri address = new Uri(uri);


CredentialCache LoginCredentials = new CredentialCache();


LoginCredentials.Add(new Uri("https://api.constantcontact.com/ws/customers/" + username), "Basic", new NetworkCredential(apikey + "%" + username, password));


WebRequest Request = WebRequest.Create(listuri); // URI for the GET


Request.Credentials = LoginCredentials;


try {


HttpWebResponse Response = (HttpWebResponse)Request.GetResponse();


StreamReader Reader = new StreamReader(Response.GetResponseStream());


string XMLResponse = Response.StatusCode + " " + Response.StatusDescription + " " + Reader.ReadToEnd();


Reader.Close();


Response.Close();


}


catch (WebException e) { }

1 REPLY 1
Employee

Hello,



Would it be possible if you could use the RESTClient to make the request where you get the 404 error, then go to File and Save the Request, and then send it to the Webservices Support team.



Once I receive it I will be able to tell you exactly what is wrong.



Regards,

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

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

Visit Page