0

[ASK]Can't Logout..help..

Hi...please help me..when i do logout...definitly error 501...!!
I use alternative API like here:

/v1/session?_method=delete

thank's 4 u all..^^

by
4 Replies
  • Can you add more information on the error you are getting. Namely

    1) the HTTP response status code
    2) the HTTP response body (if any)
    0
  • Hi Teguh

    Did you use:
    POST /v1/session?_method=delete
    or
    GET /v1/session?_method=delete

    Thx
    ~jimmi
    0
  • 1. You must use Method: DELETE
    2. You must specify session id in your request uri: /v1/session?sid=sessionId
    0
  • You can build the request URL as follows:

    string url = "http://developer.messenger.yahooapis.com/v1/session" +
    "?oauth_consumer_key=" + consumerKey +
    "&oauth_nonce=" + new Random().Next(123400, 9999999).ToString() +
    "&oauth_signature=" + consumerSecret + "%26" + oauthTokenSecret +
    "&oauth_signature_method=PLAINTEXT" +
    "&oauth_timestamp=" + getTimestamp() +
    "&oauth_token=" + oauthToken +
    "&oauth_version=1.0" +
    "&notifyServerToken=1" +
    "&sid=" + yahooSessionInfo.sessionId;

    HttpWebRequest logoffRequest = WebRequest.Create(url) as HttpWebRequest;

    logoffRequest.Method = "DELETE";

    And once you make the request, you will be logged off. I think Yahoo doesn't send back any response text, just a status 200 OK.
    0

Recent Posts

in Messenger IM SDK