Skip to content

Document oauth 2 usage of analytics-admin/data etc #9115

@eldair

Description

@eldair

Please document analytics admin/data API usage via oauth 2 - we should not be forced to go through issues and rejected pull requests to get this info.

e.g.

$credentials =  \Google\ApiCore\CredentialsWrapper::build([
                'keyFile' => [
                    'type' => 'authorized_user',
                    'client_id' => $clientId,
                    'client_secret' => $clientSecret,
                    'access_token' => $token,
                    'refresh_token' => $refreshToken,
                    'expires_in' => $expiresAt,
                ],
            ]);
$client = new Google\Analytics\Admin\V1beta\Client\AnalyticsAdminServiceClient(['credentials' => $credentials]);
$stream = $client->listAccounts(new Google\Analytics\Admin\V1beta\ListAccountsRequest())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions