0

Yahoo File Transfer api (POST relay server returns 500)

Hi,

I am trying to Transfer a File between 2 users but got a 500/Service Error and according to the Chapter 4. Yahoo! Messenger File Transfer API, 500 means invalid or missing token. I URL encoded the token received but I think YahooServer has problem to url decoded Unicode char '\u0002. Is someone experienced this issue?

Here the token I received into the fileTransferReceive notification:

HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: 453 X-Max-Sequence: 2

{ "@pendingMsg" : 0, "@syncStatus" : 0, "responses" : [ { "fileTransferReceive" : { "sequence" : 2, "sender" : "ozeliza66" , "receiver" : "ozeliza77" , "fileName" : "avatar.jpg" , "transferType" : 3, "transferTag" : "98.136.112.33" , "token" : "nSmCVvXEeHqQd9raCYJeYQ--\u0002t8qBV7BiOpXAhqy4VYSaLfKyS7EKEKTAJ8U0rXKRNIBieYBup7.Z.b.uAn_qsJL2V9AmRyvIXqhXiVIt7W9_KMjyd0IlBx7HRKh7sQ3uUjk_GA--" , "sessionId" : "59f1b3bf-d489-4660-8550-670716186b40" } } ] }

And here the request I sent to the relay server to upload the file:

POST /relay?receiver=ozeliza66&sender=ozeliza77&sid=ZZdOabbs3B..IzITj88Qty_Y9j9YsP8ocW0F&token=nSmCVvXEeHqQd9raCYJeYQ--%5Cu0002t8qBV7BiOpXAhqy4VYSaLfKyS7EKEKTAJ8U0rXKRNIBieYBup7.Z.b.uAn_qsJL2V9AmRyvIXqhXiVIt7W9_KMjyd0IlBx7HRKh7sQ3uUjk_GA-- HTTP/1.1 Host: 98.136.112.33 Content-Type: image/jpeg Authorization: OAuth oauth_consumer_key="dj0yJmk9M29ZTTdUOU5HUlRiJmQ9WVdrOVUwMVZOMHRrTlRBbWNHbzlPVEF4T1RZMU5qWXkmcz1jb25zdW1lcnNlY3JldCZ4PTc1", oauth_token="A%3DtJL5UlWb4xw1V.JOJnkjY9ZKuQsNQSqZ_v4fZD9D3t4TRlPQJ.BoyoeoDvo3do6Yx3cOOdtGJmN0gv4w5078jzU3RdTcvksvnFZVPIzpjJ9t4x2asFSNmDSb3Ym95CKp1praFSfrXfPr8nG46YRNfANSmX56R7u.4Fa_TOn.b3chJH5JIeMYpi.t4HG8AQL76nREBv4L6y_i2dDqQXTRceKGb0iU4rNlfCEyV733F21a5txNwsmKNt4KZDha.6A7ONMjqe6jB.HZ5wfCpHN2UIX9_9sfaPfiBp4fEWA4vBl4no0DOvcg1e6iqgSBytf9nvFoOaFjsymRAGgrmTDomghbXLcnzUderv8TL90htBDRUUVvTQbaDuloL4_AR38fzCLNlsGVNsHx7GDsJuJsRUyyCLpeZXYEh1Dj.1XzdLYriQolTYsvp8Tc9nYmX1fttx0qqBh_bZFEf7_wHZZ_2dab_BovtJe6jq1Y7WXvWGzaODexEw3PWIDRKc.EK9gyMjRaBtezq4XswsbnZHwJoVBrfsIFIfKBHSXnrDoqNYdMR4Z1bzb5ZfpRb5EEJFNLxQCAbculMfDQh5ZEy7y6t9h3K2Hq84NdfFGJODgvWRv6.SDnTel5LQM68b7rX13yC6rk757abG7GrGYB7WY6xHO7kcPDuk2vzj73Hubz5T7185aC08cCiyMdPbw3QG8K_DGSlYr2z8Siot2bR.gdARkakhMZMspjzMU.XjrhAlE4VsgrAEgSMZWk2YcqpIQd9fY_i6V0UPwEDqyXNOJb_g2Hwk7d2RXHizWFvoltXXenVBhQLKWqYEgnvw1Km5MVgM1OVuG9fXfaoQ--", oauth_signature_method="HMAC-SHA1", oauth_signature="rIWr2S3sfzqWO8cq0yGNiik40fw%3D", oauth_timestamp="1353690110", oauth_nonce="fY58ZP93mUmc%2FXEMvpP2Mw%3D%3D", oauth_version="1.0"

Connection: keep-alive Accept: / User-Agent: NING/1.0 Transfer-Encoding: chunked

e25

......JFIF.....H.H.....C............... etc.....

HTTP/1.0 500 Service Error

Server: YHttpServer Connection: close Content-Type: text/plain

An application error has occured.

Thanks for sharing your experience, Elizabeth Gagne

by
1 Reply
  • Well I figure out that Yahoo Relay Server doesn't support streaming of file (Transfer-Encoding: chunked). So I have to transform the InputStream into a byte array and send it to Yahoo to make it work.

    0

Recent Posts

in Messenger IM SDK