![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/Tr1sHnp7PwgJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
Also, I recommend using the HMAC-SHA1 method for this sample, as you can simply provide your consumer key and secret without providing a private key to sign OAuth requests.
Michael.--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/ifDgqtSbtUUJ.
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/js4QO5SqAtgJ.
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
-Aaron
--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/j1w45BEd8wQJ.
// Step 1: Get OAuth Request Token
GoogleOAuthGetTemporaryToken temporaryToken =
new GoogleOAuthGetTemporaryToken();
temporaryToken.callback = "oob";-Aaron
signer.clientSharedSecret = <CLIENT_SHARED_SECRET_HERE>;
temporaryToken.signer = signer;
temporaryToken.consumerKey = <CONSUMER_KEY_HERE>;
temporaryToken.scope = "https://apps-apis.google.com/a/feeds";
temporaryToken.transport = new NetHttpTransport();
OAuthCredentialsResponse tempCreds = temporaryToken.execute();
// Step 2: Get OAuth Authorize Token
signer.tokenSharedSecret = tempCreds.tokenSecret;
GoogleOAuthAuthorizeTemporaryTokenUrl authorizeUrl = new GoogleOAuthAuthorizeTemporaryTokenUrl();
authorizeUrl.temporaryToken = tempCreds.token;
String authorizationUrl = authorizeUrl.build();
System.out.println("Go to this authorizationUrl: " + authorizationUrl);
BufferedReader inStream = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Paste verification code: ");
String verifier = inStream.readLine();
// Step 3: Get OAuth Access Token
GoogleOAuthGetAccessToken accessToken = new GoogleOAuthGetAccessToken();
accessToken.temporaryToken = tempCreds.token;
accessToken.signer = signer;
accessToken.consumerKey = <CONSUMER_KEY_HERE>;
accessToken.verifier = verifier;
accessToken.transport = new NetHttpTransport();
OAuthCredentialsResponse creds = accessToken.execute();
signer.tokenSharedSecret = creds.tokenSecret;
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
-Aaron
--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/MYOhaFKjAdUJ.
HTTP400 Bad Request: in the case of an unsupported or missing parameter, an unsupportedoauth_signature_method, or other error in the request format or content.
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/CctvU0TIM4IJ.