(client_id, client_secret, refresh_token)
return json.loads(response)
Obtains a new token given a refresh token.

  See https://developers.google.com/accounts/docs/OAuth2InstalledApp#refresh

  Args:
    client_id: Client ID obtained by registering your app.
    client_secret: Client secret obtained by registering your app.
    refresh_token: A previously-obtained refresh token.
  Returns:
    The decoded response from the Google Accounts server, as a dict. Expected
    fields include 'access_token', 'expires_in', and 'refresh_token'.
Obtains a new token given a refresh token.
Obtains a new token given a refresh token .
def RefreshToken(client_id, client_secret, refresh_token):
  """Obtains a new token given a refresh token.

  See https://developers.google.com/accounts/docs/OAuth2InstalledApp#refresh

  Args:
    client_id: Client ID obtained by registering your app.
    client_secret: Client secret obtained by registering your app.
    refresh_token: A previously-obtained refresh token.
  Returns:
    The decoded response from the Google Accounts server, as a dict. Expected
    fields include 'access_token', 'expires_in', and 'refresh_token'.
  """
  params = {}
  params['client_id'] = client_id
  params['client_secret'] = client_secret
  params['refresh_token'] = refresh_token
  params['grant_type'] = 'refresh_token'
  request_url = AccountsUrl('o/oauth2/token')

  response = urllib.urlopen(request_url, urllib.urlencode(params)).read()
  return json.loads(response)
def RefreshToken ( client_id , client_secret , refresh_token ) : params = { } params [ 'client_id' ] = client_id params [ 'client_secret' ] = client_secret params [ 'refresh_token' ] = refresh_token params [ 'grant_type' ] = 'refresh_token' request_url = AccountsUrl ( 'o/oauth2/token' ) response = urllib . urlopen ( request_url , urllib . urlencode ( params ) ) . read ( ) return json . loads ( response )