Hello,
I am using c# for Yahoo Messanger SDK. (400) Bad Request is coming when I send file to the contact
Please can you describe me how can we send file to the contact .
Thanks
Sorry, I just finish the send file api
you can send file to contact by send action=send
"http://" + iServer + "/v1/filetransfer/relay"
and POST data :
"{\"sendAs\":\" + iPrimaryLoginID + "\",\"action\":\"invite\",\"ftSessionId\":\"" + sessionID +
"\",\"target\":\"" + aYahooContact.iID + "\",\"files\":[{\"fileName\":\"" + filename + "\",\"fileSize\":" + size + "}]}";
note that sessionID is a random number that we need to generate for send file
then the target will be prompted that you want to send file blablabla
when target is accept the file, we will get notification fileTransferInvite with action=3
and you need to send to:
"http://" + iServer + "/v1/filetransfer/relay"
"{\"sendAs\":\" + iPrimaryLoginID + "\",\"action\":\"send\",\"ftSessionId\":\"" + sessionID +
"\",\"target\":\"" + aYahooContact.iID + "\",\"fileName\":\"" + filename + "\",\"relayIP\":" + relayIP + "}";
note: sessionID here is the one that we received from notification, and relayIP is IP from "ftrelay.messenger.yahooapis.com"
then you will receive notification "fileTransferReceive"
after receive this, we can upload the actual file to:
* http:// [relayIP] / relay
with POST data is the actual file
Well, that's what I do and it's working ( I haven't test send file multiple files, I don't need it anyway ).
The receive file still not working to me, have you tried it ?