I am having a hard time getting the two legged Oauth to work for my Calendar 
resource API requests. This works fine with ClientLogin mechanism. I get a
com.google.gdata.util.AuthenticationException: Unknown authorization header 
everytime. 

Here is the code snippet in Java

     String CONSUMER_KEY = "aaa";
     String CONSUMER_SECRET = "bbb";
     String xoauth_requestor_id ="[email protected]";
     
     GoogleOAuthParameters oauthParams = new GoogleOAuthParameters(); 
     oauthParams.setOAuthConsumerKey( CONSUMER_KEY); 
     oauthParams.setOAuthConsumerSecret(CONSUMER_SECRET);
     oauthParams.addExtraParameter("xoauth_requestor_id", "[email protected]");
     oauthParams.setOAuthType(OAuthType.TWO_LEGGED_OAUTH);
     oauthParams.setScope("https://apps-apis.google.com/a/feeds/";);

     OAuthSigner signer = new OAuthHmacSha1Signer();
     
     service.setOAuthCredentials(oauthParams, signer);
     URL postUrl = new 
URL("https://apps-apis.google.com/a/feeds/calendar/resource/2.0/[email protected]";); 
 
     
     service.setContentType(ContentType.ATOM);
     GDataRequest myRequest = service.createInsertRequest(postUrl);
     ..............................
    ...............................


Thanks
Gumnam
    

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to