0

fileTransferReceive notification - file transfer

after obtaining the sessionID from file invite, and after implementing in action: send , how do I obtain fileTransferReceive notification ?
From v1/notifications ? (if I apeal that again, I will again receive fileinvite, not filetransfer receive
string postdata = "{\"sendAs\":\"" + myid+ "\",\"action\":\"send\",\"ftSessionId\":\"" + fsessionId + "\",\"target\":\"" + aYahooContactID + "\"fileName\":\"" + filename + "\",\"relayIP\":" + relayIP + "}";
what do I do from here? If I appeal webresponse I get error 400

Thank you

by
2 Replies
  • QUOTE (dave_david @ Mar 4 2011, 12:07 AM) <{POST_SNAPBACK}>
    after obtaining the sessionID from file invite, and after implementing in action: send , how do I obtain fileTransferReceive notification ?
    From v1/notifications ? (if I apeal that again, I will again receive fileinvite, not filetransfer receive
    string postdata = "{\"sendAs\":\"" + myid+ "\",\"action\":\"send\",\"ftSessionId\":\"" + fsessionId + "\",\"target\":\"" + aYahooContactID + "\"fileName\":\"" + filename + "\",\"relayIP\":" + relayIP + "}";
    what do I do from here? If I appeal webresponse I get error 400

    Thank you


    The fileTransferReceive notification is received from the peer user only after you submit the action=send request. It's hard to tell why you are getting a 400 error for the action=send request based on the information here. Can you possible add the http request/response starting with the action=invite, receiving the fileTransferInvite response, and then the 400 failure on action=send

    Also, the overall protocol flow is also documented at http://developer.yahoo.com/messenger/guide...nsfermanagement

    thanks,
    Vivek
    0
  • the uri for file transfer is url: string uri = URL_YM_TRANSFER +
    "?&sid=" + SESSION_ID +
    "&oauth_consumer_key=" + CONSUMER_KEY +
    "&oauth_signature_method=PLAINTEXT" +
    "&oauth_nonce=" + randNo.ToString() +
    "&oauth_timestamp=" + DateTime.Now +
    "&oauth_signature=" + SECRET_KEY + "%26" + OAUTH_TOKEN_SECRET +
    "&oauth_version=1.0" +
    "&oauth_token=" + OAUTH_TOKEN ;
    string postdata = "{\"sendAs\":\"" + myid + "\",\"action\":\"invite\",\"ftSessionId\":\"" + f_sessionId + "\",\"target\":\"" + aYahooContactID + "\",\"files\": [{\"fileName\":\"" + fileArr + "\",\"fileSize\":" + 1168 + "}]}"; filename = "doc.txt"
    I appeal httpwebrequest , with x.method = "post", asciiencoding and
    byte[] bb = encoding.GetBytes(postdata);
    yy.Write(bb, 0, bb.Length);
    yy.Flush();

    yy.Close();

    and i appeal method with notification from where i take fileTransferInvite sessionID
    . I appeal again the method with file transfer action: send, httpwebrequest with webrequest.method = "post"". get bytes and appeal again notification. Sometimes i get error 400 if in postdata in filename I send the bytes of the filename and if I send just the filename and I appeal again notification it retunrs filetransferInvite, not filetransferreceive. why?
    thx
    0

Recent Posts

in Messenger IM SDK