php - OAuth2 token, message: '{ "error" : "access_denied" }' returned when I try to update Google Calendar using OAuth (Service Account) -
i using google standard library php using calendar service , have set service account type oauth 2.0 authentication through google api console. my main objective update user's google calendar (eg: user@organisationname.com) (when user not online) through batch. eg. updating event in users calendar. when user logs in application (using oauth2.0) he/she provide permission application "manage calendars","view calendars" , "perform these operations when i'm not using application" following code used login using oauth2.0 <?php require_once '../../src/google_client.php'; require_once '../../src/contrib/google_calendarservice.php'; session_start(); $client = new google_client(); $client->setapplicationname("google calendar php starter application"); $client->setclientid('xxxxx-flue2a9o5ll602ovrhaejlpm9otgjh1r.apps.googleusercontent.com'); $client->setclientsecret('xxxxxxxxxx'); $client...