我们可以在 Google 人 API 中使用多个范围 PHP
Can we use multiple scopes in Google People API in PHP
我在 php 中使用 google 人 API。
请回答这个问题。
我很迷茫。
基本上我想显示电子邮件地址,如果有人有解决方案建议我
$client = new Google_Client();
$client->setApplicationName('People API');
$client->setScopes(Google_Service_PeopleService::CONTACTS);
$client->setAuthConfig('credentials.json');
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
setScopes
支持范围数组。
$client->setScopes([
Google_Service_PeopleService::CONTACTS,
Google_Service_PeopleService::USER_EMAILS_READ
]);
我在 php 中使用 google 人 API。 请回答这个问题。 我很迷茫。 基本上我想显示电子邮件地址,如果有人有解决方案建议我
$client = new Google_Client();
$client->setApplicationName('People API');
$client->setScopes(Google_Service_PeopleService::CONTACTS);
$client->setAuthConfig('credentials.json');
$client->setAccessType('offline');
$client->setPrompt('select_account consent');
setScopes
支持范围数组。
$client->setScopes([
Google_Service_PeopleService::CONTACTS,
Google_Service_PeopleService::USER_EMAILS_READ
]);