I get the files from logged in user drive. Need to watch their content
$this->drive = new Google_Service_Drive($client);
$optParams = [
'fields' => 'files(*)',
'q' => ''
];
$driveContent = $this->drive->files->listFiles($optParams)->getFiles();
foreach ($driveContent as $file) {
$resuorse = (new \Google_Service_Drive_Channel());
$resuorse->setResourceId($file->getID());
$resuorse->setResourceUri("https://www.googleapis.com/drive/v3/files/".$file->getID());
dd($this->drive->files->watch($file->getID(), $resuorse));
}
It returns an error
{ "error": { "errors": [ { "domain": "push", "reason": "channelUnknown", "message": "Unknown channel type: " } ], "code": 400, "message": "Unknown channel type: " } }