We get a response from Yahoo! that looks like this:
oauth_token=<some long token value> &oauth_token_secret=c5a9684d3a3aa22aa051308987219e=b8d6982fc &oauth_expires_in=3600 &oauth_session_handle=AKVdNElJthnrHDwnYDuj6fJ2ayRb=vkePz9AKwi9dQAfb4bd &oauth_authorization_expires_in=919314350 &xoauth_yahoo_guid=DKXSX6Q5TA5SVNARZLUJU5AW7A
We can then use this access token towards requests to Yahoo! Web services. For this we downloaded the sample java code from Yahoo! Mail Web Service Code Samples (http://developer.yahoo.com/mail/code/mail_java.zip)
In this sample code we need to provide the Application ID, Shared Secret and user token. We think it is after this step that we might be doing something wrong.
The Application Id we provide is one that we got at time of registration. So application ID for our application is (2CHO.pnIkY3R6364sR61aQj8xZUusUTNTdqezNjt8mqP4w--) and shared secret is (4434ce37c2fbd9c7f53effe8de369732)
One question is: Are this Application ID and Shared secret different from Consumer Key and Consumer secret?
Also, the token we provide is the token we received in step 4. Once we run this sample code with the credentials using following URL:
Note that the PHP sample code that was provided to us works fine with our consumer key and consumer secret. And that application does not even ask for application id or shared secret.
We even tried comparing PHP code with Java sample code on the yahoo developer site and what we found is that both are doing different kinds of processing for fetching signature in step 4. PHP sample is using a consumer key, consumer secret, token, token secret and java code is using application Id, shared secret and token only.