Hi Jagot, It is possible to get the refresh token and use it to get an access token. When working on GData APIs this is true for a single run of application. If the application is running for a long time, such that the access token expires in between, then you can refresh your access token.
For the new APIs, it is possible to once authorize and save the refresh token for subsequent runs. Workaround for working on GData libraries with the refresh token can be: You may get the OAuth 2.0 token using the new library<http://code.google.com/p/google-api-python-client/source/checkout> and save the refresh token. The new library provides the support for saving the token. Then you can use this token with the GData client library. Refer this sample<http://code.google.com/p/google-vacation-responder-demo/source/browse/vacation_responder.py> that uses the two libraries together. Shraddha Gupta Developer Programs Engineer Hyderabad, Google India. On Thu, Jan 19, 2012 at 8:10 PM, Jagot <[email protected]> wrote: > Shraddha, > > Can you not use the 3-legged OAuth with an admin user and save the > refresh token. When a user then comes back, you can use the refresh > token to get an access token and continue to change the password. Is > this possible? > > > On Jan 19, 11:25 am, Shraddha Gupta <[email protected]> wrote: > > Hello Max, > > > > The scripts trigger in an asynchronous way. > > You can add code in your script to update a field in spreadsheet on > success > > of the request. > > Also, on success you can remove the saved password from your spreadsheet > > and inform the user that his password is updated. > > > > onEdit trigger is fired immediately, so you have to wait only for the > time > > taken to complete the operation. You can save the password in some > > encrypted form in your spreadsheet and decode it in the script itself. > > > > There are no plans for now to give read/write access with 2-legged OAuth > > for the Provisioning API. This is for the better security of the domain > > data. > > > > The script fails to run due to lack of authorization. > > You require to authorize first by running the script from the script > editor > > as David said. After authorization, the script will trigger itself. > > > > Thank you, > > Shraddha Gupta > > Developer Programs Engineer > > Hyderabad, Google India. > > > > > > > > > > > > > > > > On Thu, Jan 19, 2012 at 6:41 AM, David Haley <[email protected]> > wrote: > > > Hi Max, > > > > > Try running the script from the script editor directly just once - it > will > > > prompt you for that authorization which will be reused when run from > the > > > trigger. > > > > > Cheers, > > > David Haley | Google Enterprise | Sales Engineer > > > Sent from my Android phone > > > On Jan 18, 2012 1:51 PM, "Max Noel" <[email protected]> wrote: > > > > >> Also, what privileges do I need to grant the user the Apps Script is > > >> running as, in order to allow usage of the UserManager class? In my > > >> preliminary tests, all calls to this class (from an onEdit trigger) > fail > > >> with "Authorization is required to perform that action." > > > > >> -- Max > > > > >> -- > > >> 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/-/88LZgXG79HwJ. > > >> 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. > -- 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.
