Monday, June 21, 2010

For Developers - Login to Yahoo Messenger - Step 1

Retrieving the User's Credentials

When Yahoo! redirects the user from the Yahoo! login page to your endpoint URL, the URL includes a token parameter. This token is valid for fourteen days, and represents the user's willingness to allow you to make web service calls on their behalf. 

The next step is to retrieve the auth cookie and the WSSID, which comprise the credentials you need to make authenticated web service calls. When retrieving credentials, try to make the call in a manner that does not interrupt the user experience. 

To retrieve the WSSID and auth cookie, make a request to the URL https://api.login.yahoo.com/WSLogin/V1/wspwtoken_login with these parameters: 

Field Description
appid The application ID, which identifies the developer and the application. Obtained during initial application registration. You must pass this parameter in both the query string and your application's User-Agent.
ts The timestamp in seconds as measured from Jan 1, 1970 GMT. To make sure that your clock is in sync with Yahoo! servers, use the Network Time Protocol Daemon (ntpd).
token The token returned by the user from the Yahoo! login server.
sig An MD5 hash of a carefully constructed relative URL:
  • A login path (/WSLogin/V1/wspwtoken_login), plus
  • Your application ID (?appid=id), plus
  • The user's token, (&token=token), plus
  • The timestamp (&ts=seconds), plus
  • Your shared secret (secret).

No comments: