-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Service Account #3
Comments
Hi @carlotta11 do you have any solutions for this?? |
Hi, |
Well, in the end I did it without this class. |
I have same kind of autorization and i use this code to add a contacto and it finish whitout errors but i dont find the contact in contacts.google.com Do you know why could it be?
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Im using a ServiceAccount with a json file. I do not need to authenticate with Google via OAuth 2. Is it possible to include only the class instead of all? Like this:
$client = new Google_Client();
$client->setApplicationName("...");
$client->setScopes(array('https://www.googleapis.com/auth/contacts', 'https://www.googleapis.com/auth/contacts.readonly'));
if ($credentials_file = checkServiceAccountCredentialsFile()) {
$client->setAuthConfig($credentials_file);
} elseif (getenv('GOOGLE_APPLICATION_CREDENTIALS')) {
$client->useApplicationDefaultCredentials();
} else {
echo missingServiceAccountDetailsWarning();
return;
}
$people_service = new Google_Service_PeopleService($client);
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: