(client_id, scope='https://mail.google.com/')
return '%s?%s' % (AccountsUrl('o/oauth2/auth'),
                    FormatUrlParams(params))
Generates the URL for authorizing access.

  This uses the "OAuth2 for Installed Applications" flow described at
  https://developers.google.com/accounts/docs/OAuth2InstalledApp

  Args:
    client_id: Client ID obtained by registering your app.
    scope: scope for access token, e.g. 'https://mail.google.com'
  Returns:
    A URL that the user should visit in their browser.
Generates the URL for authorizing access.
Generates the URL for authorizing access .
def GeneratePermissionUrl(client_id, scope='https://mail.google.com/'):
  """Generates the URL for authorizing access.

  This uses the "OAuth2 for Installed Applications" flow described at
  https://developers.google.com/accounts/docs/OAuth2InstalledApp

  Args:
    client_id: Client ID obtained by registering your app.
    scope: scope for access token, e.g. 'https://mail.google.com'
  Returns:
    A URL that the user should visit in their browser.
  """
  params = {}
  params['client_id'] = client_id
  params['redirect_uri'] = REDIRECT_URI
  params['scope'] = scope
  params['response_type'] = 'code'
  return '%s?%s' % (AccountsUrl('o/oauth2/auth'),
                    FormatUrlParams(params))
def GeneratePermissionUrl ( client_id , scope = 'https://mail.google.com/' ) : params = { } params [ 'client_id' ] = client_id params [ 'redirect_uri' ] = REDIRECT_URI params [ 'scope' ] = scope params [ 'response_type' ] = 'code' return '%s?%s' % ( AccountsUrl ( 'o/oauth2/auth' ) , FormatUrlParams ( params ) )