Results 1 to 2 of 2

Thread: Get attachment via SOAP

  1. #1
    Join Date
    Sep 2012
    Posts
    6
    Rep Power
    3

    Default Get attachment via SOAP

    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?

    Code:
    HttpWebRequest retVal = (HttpWebRequest)WebRequest.Create("http://" + @DOMAIN + "/service/content/" + "get?id=" + id + "&part=" + part + "");
    retVal.Method = "GET";
    Basic authentication
    Code:
    string authInfo = AccountUsername + ":" + AuthToken;
    authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
    retVal.Headers["Authorization"] = "Basic " + authInfo;
    Cookie
    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()

  2. #2
    Join Date
    Sep 2012
    Posts
    6
    Rep Power
    3

    Default

    Hello again!
    Via fiddler, i've scan the response and everything looks ok with the request.
    The response is still "Unauthorized".
    Analysing the reponse i've discovered the reason why. "Unable to parse authtoken".
    I checked the token and it's all good.
    Searched the internet and i can't find any answers.
    Can anybody help me please?

    Code:
    ZM_AUTH_TOKEN=0_65b753c79755637b23820a57773d343db821d5bf_69643d33363a33303637333634392d313931392d346138362d626363322d3639333863306562313737333b6578703d31333a313334383233343236303531383b76763d313a353b747970653d363a7a696d6272613b
    Thanks in advanced!

Similar Threads

  1. Is there a SOAP call to decode ms-tnef attachment ?
    By liverpoolfcfan in forum Developers
    Replies: 0
    Last Post: 08-10-2012, 09:35 AM
  2. Replies: 1
    Last Post: 06-27-2012, 08:10 PM
  3. Contact Image attachment SOAP
    By wolfroma in forum Developers
    Replies: 5
    Last Post: 02-05-2008, 11:57 PM
  4. Pdf Attachment
    By Rick Baker in forum Administrators
    Replies: 2
    Last Post: 01-03-2007, 12:21 PM
  5. Replies: 3
    Last Post: 05-12-2006, 05:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •