使用API​​创建Google日历事件和会议,而无需要求加入

发布于 2025-02-12 04:25:55 字数 1007 浏览 1 评论 0 原文

我能够使用以下代码来创建使用会议的Google日历:

Event event = new Event()
.setSummary(calevent.getTitle())
.setDescription(calevent.getDescription());

ConferenceSolutionKey conferenceSolutionKey = new ConferenceSolutionKey().setType("hangoutsMeet");
CreateConferenceRequest createRequest = new CreateConferenceRequest().setRequestId("xxsdswwadx")
.setConferenceSolutionKey(conferenceSolutionKey);
ConferenceData conferenceData = new ConferenceData().setCreateRequest(createRequest);
event.setConferenceData(conferenceData);

DateTime startDateTime = convertDate(calevent.getStartDateTime());
EventDateTime start = new EventDateTime()
.setDateTime(startDateTime)
.setTimeZone("Europe/London");
event.setStart(start);

DateTime endDateTime = convertDate(calevent.getEndDateTime());
EventDateTime end = new EventDateTime()
.setDateTime(endDateTime)
.setTimeZone("Europe/London");
event.setEnd(end);

但这不允许邀请人加入而无需等待主持人接受它们。在Google日历上,有一个称为“快速访问”的会议设置,当关闭时,任何人都可以加入而无需获得批准。

创建会议时可以设置这吗?

I am able to create a google calendar with conference using the following code:

Event event = new Event()
.setSummary(calevent.getTitle())
.setDescription(calevent.getDescription());

ConferenceSolutionKey conferenceSolutionKey = new ConferenceSolutionKey().setType("hangoutsMeet");
CreateConferenceRequest createRequest = new CreateConferenceRequest().setRequestId("xxsdswwadx")
.setConferenceSolutionKey(conferenceSolutionKey);
ConferenceData conferenceData = new ConferenceData().setCreateRequest(createRequest);
event.setConferenceData(conferenceData);

DateTime startDateTime = convertDate(calevent.getStartDateTime());
EventDateTime start = new EventDateTime()
.setDateTime(startDateTime)
.setTimeZone("Europe/London");
event.setStart(start);

DateTime endDateTime = convertDate(calevent.getEndDateTime());
EventDateTime end = new EventDateTime()
.setDateTime(endDateTime)
.setTimeZone("Europe/London");
event.setEnd(end);

But this does not allow invitees to join without waiting for moderator to accept them. On google calendar, there's a settings for conferences called 'Quick Access' that when turned off, allows anyone to join without having to be approved.

Can this be set when creating the conference?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

比忠 2025-02-19 04:25:56

答:

我认为您无法通过日历API管理这些设置。它的资源都不包含与此相关的任何字段。

功能请求:

我在问题跟踪器中找不到任何相关的功能请求。

因此,如果您对此感兴趣,我建议您使用相应的问题跟踪器模板

Answer:

I don't think you can manage these settings via Calendar API. None of its resources include any field related to this.

Feature request:

I couldn't find any related feature request in Issue Tracker.

Therefore, if you're interested in this, I'd suggest you to request this feature using the corresponding Issue Tracker template.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文