class Oauth2 extends Service (View source)

Service definition for Oauth2 (v2).

Obtains end-user authorization grants for use with other Google APIs.

For more information about this service, see the API Documentation

Constants

USERINFO_EMAIL

See your primary Google Account email address.

USERINFO_PROFILE

See your personal info, including any personal info you've made publicly available.

OPENID

Associate you with your personal info on Google.

Properties

$userinfo
$userinfo_v2_me
$rootUrlTemplate

Methods

__construct(Client|array $clientOrConfig = [], string $rootUrl = null)

Constructs the internal representation of the Oauth2 service.

tokeninfo(array $optParams = [])

(tokeninfo)

Details

__construct(Client|array $clientOrConfig = [], string $rootUrl = null)

Constructs the internal representation of the Oauth2 service.

Parameters

Client|array $clientOrConfig

The client used to deliver requests, or a config array to pass to a new Client instance.

string $rootUrl

The root URL used for requests to the service.

Tokeninfo tokeninfo(array $optParams = [])

(tokeninfo)

Parameters

array $optParams

Optional parameters.

Return Value

Tokeninfo

Exceptions

Exception