How to extract GUID from response header

Hi Friends,
Am developing an Address Book import using yahoo. My development is of using OAuth method i got the authentication access token secret token successfully . But the last step is extracting xoauth_guid am very much confused how to extract this guid. My development is using java. It irritates me.

OAuthConsumer consumer = new
DefaultOAuthConsumer("consumer key***", "secret key****");
OAuthProvider provider = new
System.out.println("Fetching request token from Yahoo...");
// we do not support callbacks, thus pass OOB
String authUrl = provider.retrieveRequestToken(consumer,ss);
System.out.println("Request token: " + consumer.getToken());
System.out.println("Token secret: " + consumer.getTokenSecret());
System.out.println("Now visit:\n" + authUrl
+ "\n... and grant this app authorization");
// System.out.println(x);
System.out.println("Enter the verification code and hit ENTER when you're done");
BufferedReader br = new BufferedReader(new
String oauthverifier = br.readLine();
System.out.println("Fetching access token from Yahoo...");
provider.retrieveAccessToken(consumer, oauthverifier);
HttpServletRequest request = null;
System.out.println("Access token: " + consumer.getToken());
System.out.println("Token secret: " + consumer.getTokenSecret());

I dont know how to extract guid please help me out of this hell.

3 Replies
  • Hi,

    Did you follow the guide on how to obtain GUID?

    You need to make sure that you can get the access token and
    the access token secret and then use it to sign your request to
    the get GUID API (http://social.yahooapis.com/v1/me/guid).

    The OAuth guide provides details on all the steps involved:

    Yu Wang
    Yahoo! Membership Team
  • Hi Yu Wang,
    Thanks for Your Kind reply. I have signed in with my request to get GUID in http://social.yahooapis.com/v1/me/guid but after signing in with my request i put this url (http://social.yahooapis.com/v1/me/guid) in my browser but i got this Error
    <yahoo:error xml:lang="en-US">

    Please provide valid credentials. OAuth oauth_problem="unable_to_determine_oauth_type", realm="yahooapis.com"

    :bKamalakannan JS
  • Hi,
    I got the GUID its Working thanks...

    Kamalakannan JS

Recent Posts

in OAuth General Discussion YDN SDKs