google meeting with Google_Service_Calendar_EntryPoint not working

11 views
Skip to first unread message

Ionut Costescu

unread,
Oct 31, 2023, 6:55:19 AM10/31/23
to Google APIs Discovery Service Users

I have a problem creating a google calendar event with video entry point type. Basically my EntryPoint parameters have no impact on the calendar event. It just creates it. If I am using the Google_Service_Calendar_CreateConferenceRequest, the meeting is added, but of course no password is added.

I used as a reference Create a Google Calendar event with a specified Google Meet ID, conferenceData.conferenceId

Any idea what I am doing wrong ? Thanks

This is the php code:


$service = new Google_Service_Calendar($googleClient); $batch = new Google_Http_Batch($googleClient, false, null, 'batch/calendar/v3'); $event = new Google_Service_Calendar_Event( [ 'id' => 'uniqueid'.rand(), 'summary' => 'testmeeting', 'description' => 'testmeeting', 'start' => [ 'dateTime' => $start_datetime, 'timeZone' => $timezone, ], 'end' => [ 'dateTime' => $end_datetime, 'timeZone' => $timezone, ] ] ); $meetUrl = 'tgu-igjc-sgs'; $conference = new \Google_Service_Calendar_ConferenceData(); $event->setHangoutLink('https://meet.google.com/'.$meetUrl); $conferenceSolutionKey = new \Google_Service_Calendar_ConferenceSolutionKey(); $conferenceSolutionKey->setType('hangoutsMeet'); $conference->setConferenceId($meetUrl); $conferenceSolution = new \Google_Service_Calendar_ConferenceSolution(); $conferenceSolution->setKey($conferenceSolutionKey); $conference->setConferenceSolution($conferenceSolution); // $conferenceRequest = new \Google_Service_Calendar_CreateConferenceRequest(); // $conferenceRequest->setRequestId($event->id); // $conferenceRequest->setConferenceSolutionKey($conferenceSolutionKey); // $conference->setCreateRequest($conferenceRequest); $conferenceEntryPoint = new \Google_Service_Calendar_EntryPoint(); $conferenceEntryPoint->setEntryPointType('video'); $conferenceEntryPoint->setUri('https://meet.google.com/'.$meetUrl); $conferenceEntryPoint->setLabel('https://meet.google.com/'.$meetUrl); $conferenceEntryPoint->setPassword('testpassword'); $conference->setEntryPoints($conferenceEntryPoint); $event->setConferenceData($conference); $req = $service->events->insert($calendarId, $event, ['conferenceDataVersion' => 1]); $batch->add($req); $batch->execute();
Reply all
Reply to author
Forward
0 new messages