创建日历事件时返回奇怪的错误消息

2024-01-12

我正在使用 Node.js Google 客户端 API 创建一个 google 日历活动,我请求使用以下对象通过该活动创建一个会议:

var conferenceData = 
{                    
    createRequest: 
    {
        requestId: uuid(),
        conferenceSolutionKey:
        {
           type: "hangoutsMeet"
        }
    }
}

我从服务器返回一条错误消息:Error: Invalid conference type value.这没有任何意义,因为根据本文档 https://developers.google.com/calendar/v3/reference/events#resource hangoutsMeet是一个可接受的值:

可能的值为:

  • "活动环聊” 对于面向消费者的环聊 (http://hangouts.google.com http://hangouts.google.com)
  • "事件名为Hangout” 对于 G Suite 用户的传统版环聊 (http://hangouts.google.com http://hangouts.google.com)
  • "环聊聚会” 对于 Hangouts Meet (http://meet.google.com http://meet.google.com)

有人知道为什么它会返回该错误吗?


我现在面临着同样的问题。 我相信这实际上是因为您尝试插入活动的日历不接受“hangouts Meet”电话会议类型。

您可以通过使用 API 获取日历设置详细信息来进行检查,在conferenceProperties.allowedConferenceSolutionTypes 中: -https://developers.google.com/calendar/v3/reference/calendars/get https://developers.google.com/calendar/v3/reference/calendars/get - https://developers.google.com/calendar/v3/reference/calendars#resource https://developers.google.com/calendar/v3/reference/calendars#resource

对于我的特定情况,我可以观察到日历仅支持“eventNamedHangout”,并且未列出“hangoutsMeet”。

话虽如此,我不知道如何实际确保特定日历资源支持“hangoutsMeet”类型。

Edit

看来我的问题来自于我使用 GCP 服务帐户的事实 - 在这种情况下,我观​​察到仅支持 eventNamedHangout 类型。 当使用通过 oauth dance 获得的 access_token 向 API 发送完全相同的负载时,hangoutsMeet 变得可用。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

创建日历事件时返回奇怪的错误消息 的相关文章

随机推荐