我正在实施一个在日历中创建活动的软件,但是当我创建它时,Google会默认添加一个视频群聊(视频通话)链接。多数民众赞成使这一事件有点令人困惑。
我知道您可以通过转到用户高级选项并取消选中该选项来消除此问题,但我无法访问它。我正在使用java和OAuth 2.0来获取具有权限的令牌,并使用calendar v3 api来创建事件。
无论如何你可以在整个代码中消除这个环聊链接吗?
在我发现的文档中:myEntry.setHangoutLink(null);
但它仍然不起作用。
编辑2018-09-19
您可以通过发出Events.patch
请求从Google日历事件中删除环聊,确保将查询参数conferenceDataVersion
设置为1
,并将conferenceData
设置为null
。例如:
POST https://www.googleapis.com/calendar/v3/calendars/primary/events/{EVENT_ID}
?conferenceDataVersion=1
Authorization: Bearer {ACCESS_TOKEN}
{
"conferenceData": null
}
如果有人仍在寻找解决方案。以下是我们如何使用npm模块googleapis完成它的示例。
这是在'insert'期间完成的,而不是在'patch'期间完成的。请注意'conferenceData'为空,conferenceDataVersion设置为1。
var event = {
'summary': 'some summary data here',
'location': 'some location',
'description': 'add your description',
'start': {
'dateTime': 'add your start time here',
},
'end': {
'dateTime': 'add your end time here',
},
'attendees': [{
'email': '[email protected]'
}
],
'reminders': {
'useDefault': true
},
'conferenceData' : null
};
calendar.events.insert({
auth: oauth2Client,
calendarId: 'primary',
conferenceDataVersion: 1,
resource: event,
sendNotifications: false,
email: '[email protected]'
}, function (err, event) {
if (err) {
console.log(err)
}
console.log(event)
});