A
A
andead2018-11-21 18:10:04
Google
andead, 2018-11-21 18:10:04

How to use Google OAuth to request access to only a specific user's calendar?

I am writing a php script for adding events to Google Calendar using the google/apiclient library . The problem is that during authorization, you can request access to manage all the user's calendars, and not a specific one, which is rather non-secure.
Question - is it possible to access only a specific calendar?
Now the code looks like this:

$googleapi_client = new Google_Client();
$googleapi_client->setScopes(array(Google_Service_Calendar::CALENDAR, Google_Service_Calendar::CALENDAR_EVENTS));
...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question