I can create an event but I can't create an event with a conference.
I tried all these types: "eventHangout" "eventNamedHangout" "hangoutsMeet" but still getting Invalid conference type value
Google.GoogleApiException: 'Google.Apis.Requests.RequestError Invalid conference type value. [400] Errors [ Message[Invalid conference type value.] Location[ - ] Reason[invalid] Domain[global] ]
Here's the code that creates and executes an event:
CalendarService service = GetCalendarService();
EventDateTime start = new EventDateTime();
start.DateTime = new DateTime(2021, 02, 19, 18, 47, 0);
EventDateTime end = new EventDateTime();
end.DateTime = new DateTime(2021, 02, 19, 18, 50, 0);
Event newEvent = new Event();
newEvent.Start = start;
newEvent.End = end;
newEvent.Summary = "New event";
newEvent.Description = "description";
newEvent.ConferenceData = CreateConferenceData();
EventsResource.InsertRequest request = service.Events.Insert(newEvent, calendarId);
request.ConferenceDataVersion = 1;
Event createdEvent = request.Execute();
Here's the code of CreateConferenceData() method:
ConferenceData conferenceData = new ConferenceData()
{
CreateRequest = new CreateConferenceRequest()
{
RequestId = Guid.NewGuid().ToString(),
ConferenceSolutionKey = new ConferenceSolutionKey()
{
Type = "hangoutsMeet" // Change according to your preferences
};
}
};
return conferenceData;
CreateRequest
andConferenceSolution
. The docs say "Either conferenceSolution and at least one entryPoint, or createRequest is required." I'd try just specifying ConferenceSolution+EntryPoints, or specify just CreateRequest. – RigsdalerCreateConferenceData()
used to work, but no longer does. API Explorer works just fine, so I suspect it's a problem with the client libraries. Issue logged here: github.com/googleapis/google-api-dotnet-client/issues/1894 but I can also log at the bug tracker if preferred – Alsatia