Hello!
I'm trying to get an attachment via SOAP but i'm not getting there. I'm allways getting "Unauthorized".
I've tried basic authentication with a normal user and admin. Replaced the token for a password.
I've tried with a cookie with a normal user and admin. Replaced the token for a password.
None of this work. Can you help me please?
Basic authenticationCode:HttpWebRequest retVal = (HttpWebRequest)WebRequest.Create("http://" + @DOMAIN + "/service/content/" + "get?id=" + id + "&part=" + part + ""); retVal.Method = "GET";
CookieCode:string authInfo = AccountUsername + ":" + AuthToken; authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)); retVal.Headers["Authorization"] = "Basic " + authInfo;
Code:CookieContainer cookieJar = new CookieContainer(); Cookie c = new Cookie("ZM_AUTH_TOKEN", AuthToken); c.Domain = @DOMAIN; cookieJar.Add(c); retVal.CookieContainer = cookieJar;Code:retVal.GetResponse()


LinkBack URL
About LinkBacks

