I am using google workspace to mange my calanders:
And I have this code to try and access it:
$calendar_id = "***********@resource.calendar.google.com";
$client = new \Google_Client();
$client->setAuthConfig(storage_path('app/google-calendar/service-account-credentials.json'));
$client->addScope(\Google_Service_Calendar::CALENDAR);
// list all events
$service = new \Google_Service_Calendar($client);
$results = $service->events->listEvents($calendar_id);
return $results;
But, I am getting this error:
"{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"global\",\n \"reason\": \"notFound\",\n \"message\": \"Not Found\"\n }\n ],\n \"code\": 404,\n \"message\": \"Not Found\"\n }\n}\n"
Any ideas?