Yes, using a stored token from a 3LO dance should work. Below is an example of using this method:
- Michael ---- What you can do to workaround this is use "stored token" 3-Legged OAuth. What you do is fetch an authorized token, and then you store it in your script. Here are the steps: - Create an admin role account (e.g. [email protected].) - Browse to http://googlecodesamples.com/oauth_playground/ in an incognito window. - Check off the scopes you need or enter them in (e.g. https://apps-apis.google.com/a/feeds/) - Set oauth_signature_method: HMAC-SHA1 - Set oauth_consumer_key: anonymous - Set consumer_secret: anonymous - Click Request token - Click Authorize - Click Grant Access - Click Access token - Copy what's in oauth_token, paste it in the relevant spot in your script (see example, below) - Copy what's in oauth_token_secret, paste it in the relevant spot in your script (see example below) Here is a code snippet for the relevant OAuth code in Java: GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters(); oauthParameters.setOAuthConsumerKey("anonymous"); oauthParameters.setOAuthConsumerSecret("anonymous"); oauthParameters.setOAuthToken(oauthAccessToken); oauthParameters.setOAuthTokenSecret(oauthTokenSecret); AppsForYourDomainClient client = new AppsForYourDomainClient(APPLICATION_NAME); client.setOAuthCredentials(oauthParameters, new OAuthHmacSha1Signer()); - Michael On Mar 3, 12:58 pm, Robert Norris <[email protected]> wrote: > You should be able to do a 3-legged OAuth setup and then store the access > token. Its a little more effort to set up but you won't need the password > for future accesses. I haven't tested this but I see no reason why it > shouldn't work. If I get time I'll test it from the office today. > > > > > > > > On Fri, Mar 4, 2011 at 6:33 AM, Jason K <[email protected]> wrote: > > I was about to post a similar question regarding the Provisioning API. I > > was hoping to retrieve a list of all domain users without having to use a > > domain admin's username and password. 2-Legged oAuth would be a better > > solution for my organization. > > >http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_... > > <http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_...> > >http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_... > > > Jason > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Apps Domain Information and Management APIs" 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://groups.google.com/group/google-apps-mgmt-apis?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" 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://groups.google.com/group/google-apps-mgmt-apis?hl=en.
