xxxxxxxxxx
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/calendar']
xxxxxxxxxx
//change:
$client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);
//to:
$client->setScopes(Google_Service_Calendar::CALENDAR);