views:

8

answers:

0

Hi guys, i am using the Python lib to access Gmail and Contacts. Is it possible to bypass the screen that allows the user to select among multiple google accounts. I already know the account he wants to import so I ld like to display the Grant Access screen after the redirection as some other apps do.

The code i use now is:

google = gdata.contacts.service.ContactsService(
          source=GOOGLE_OAUTH_SETTINGS['APP_NAME'],
          additional_headers = {'GData-Version': 3})

google.SetOAuthInputParameters(GOOGLE_OAUTH_SETTINGS['SIG_METHOD'], 
           GOOGLE_OAUTH_SETTINGS['CONSUMER_KEY'],
           consumer_secret=GOOGLE_OAUTH_SETTINGS['CONSUMER_SECRET'])

req_token = google.FetchOAuthRequestToken(
     scopes=GOOGLE_OAUTH_SETTINGS['SCOPES'],
     oauth_callback="http://"+request.env.http_host+URL(
     r=request,c='default',f='import_accounts',vars={'gmail':1}))

Any hints?