1

Send Message step in programming api's returning 'ERR 400: Bad Response' ?

Hi.... I try to make a 3rd software with visual studio 2005 (vb) (i learn from php sample in yahoo sdk's php sample website) to my office, to send schedully sending message to my company's client... I Have succeeded step Logon and receive 1st Token, i have successed Logon Auth and get 2nd Token, i have passing Session Logon and received sessionid,server,proxy, etc.... but i'm getting stuck when i send message always returned 'err 400:bad response'... this somepart of my message syntax xURL1 = ("http://rcore3.messenger.yahooapis.com/v1/message/yahoo/{{USER}}" _ + "?oauth_consumer_key=" + xCunsomerKey _ + "&oauth_nonce=" + UniqID() _ + "&oauth_signature=" + xSecretKey + xTokenSecret _ + "&oauth_signature_method=PLAINTEXT" _ + "&oauth_timestamp=" + Int(GetUnixTimestamp(Now)).ToString _ + "&oauth_token=" + xArrayToken2(0) _ + "&oauth_version=1.0" _ + "&sid=" + xSessionID).Replace("{{USER}}", xUserID) Dim xHTTPWebRequest2 As HttpWebRequest xHTTPWebRequest2 = HttpWebRequest.Create(xURL1) xHTTPWebRequest.Headers.Clear() xHTTPWebRequest2.Method = "POST" xHTTPWebRequest2.ContentType = "application/json; charset=utf-8" xPostDataBytes = enc.GetBytes( _ "{""message"" : Hallo This is Messaging Test}") xHTTPWebRequest2.ContentLength = xPostDataBytes.Length Using xStream = xHTTPWebRequest2.GetRequestStream() xStream.Write(xPostDataBytes, 0, xPostDataBytes.Length) Dim xResponse As WebResponse = xHTTPWebRequest2.GetResponse Dim xReaderStream As New StreamReader(xResponse.GetResponseStream) xStringToken3 = xReaderStream.ReadToEnd().ToString End Using

does anybody can help me... :D thanks fully regards

by
0 Replies

Recent Posts

in Messenger IM SDK