.Net谷歌日历API - 新事件总是挂出满足激活。

问题描述 投票:1回答:1

在我的.Net测试应用程序中,我运行以下代码。新的日历事件已成功创建,但它的事件上有hangout meets conference。我如何才能禁止在事件上自动创建一个hangout meet conference?

我已经尝试设置body.ConferenceData=null,但没有任何效果,在Insert方法之后使用CalendarService.Events.Patch方法也不行。

也不可能通过使用ConferenceSolution类填写body.ConferenceData中的字段来指定一个现有的会议--它完全被忽略了,会议总是被新建的。

        Event body = new Event();
        EventAttendee a = new EventAttendee();
        a.Email = "[email protected]";
        List<EventAttendee> attendes = new List<EventAttendee>();
        attendes.Add(a);
        body.Attendees = attendes;
        EventDateTime start = new EventDateTime();
        start.DateTime = Convert.ToDateTime("2020-04-14T09:00:00");
        EventDateTime end = new EventDateTime();
        end.DateTime = Convert.ToDateTime("2020-04-14T11:00:00");
        body.Start = start;
        body.End = end;
        body.Location = "Room";
        body.Summary = "test description";

        Event newEvent = CalendarService.Events.Insert(body, MyCalendarID).Execute();
c# calendar hangout conference
1个回答
0
投票

只适用于G Suite账户

要禁用Meet会议自动添加到任何从API创建的事件。

  1. 作为管理员,进入 admin.google.com
  2. 转到应用程序> G套件> 日历设置> 共享设置。
  3. 设置 Video CallsOFF

要手动添加一个会议到您的事件。

添加conferenceData,用一个空的Id来生成一个新的Meet会议,当做一个。插入 请求。

请求机构:

{
  "end": {
    "dateTime": "2020-05-28T09:00:00-07:00"
  },
  "start": {
    "dateTime": "2020-05-27T09:00:00-07:00"
  },
  "attendees": [
    {
      "email": "[email protected]"
    }
  ],
  "conferenceData": {
    "conferenceId": ""
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.