Google OAuth2 API

Instance Methods

userinfo()

Returns the userinfo Resource.

close()

Close httplib2 connections.

new_batch_http_request()

Create a BatchHttpRequest object based on the discovery document.

tokeninfo(access_token=None, id_token=None)

A description of how to use this function

Method Details

close()
Close httplib2 connections.
new_batch_http_request()
Create a BatchHttpRequest object based on the discovery document.

                Args:
                  callback: callable, A callback to be called for each response, of the
                    form callback(id, response, exception). The first parameter is the
                    request id, and the second is the deserialized response object. The
                    third is an apiclient.errors.HttpError exception object if an HTTP
                    error occurred while processing the request, or None if no error
                    occurred.

                Returns:
                  A BatchHttpRequest object based on the discovery document.
                
tokeninfo(access_token=None, id_token=None)
A description of how to use this function

Args:
  access_token: string, A parameter
  id_token: string, A parameter

Returns:
  An object of the form:

    {
  "audience": "A String", # Who is the intended audience for this token. In general the same as issued_to.
  "email": "A String", # The email address of the user. Present only if the email scope is present in the request.
  "expires_in": 42, # The expiry time of the token, as number of seconds left until expiry.
  "issued_to": "A String", # To whom was the token issued to. In general the same as audience.
  "scope": "A String", # The space separated list of scopes granted to this token.
  "user_id": "A String", # The obfuscated user id.
  "verified_email": True or False, # Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.
}