问题描述
我正在使用Node.js Google客户端API创建一个Google日历事件,我要求使用以下对象使用该事件创建一个会议:
I'm creating a google calendar event using the Node.js Google Client API, I'm requesting a conference be created with the event using the following object:
var conferenceData =
{
createRequest:
{
requestId: uuid(),
conferenceSolutionKey:
{
type: "hangoutsMeet"
}
}
}
我从服务器返回一条错误消息:错误:无效的会议类型值.
根据此文档 hangoutsMeet
是可接受的值:
I get an error back from the server saying: Error: Invalid conference type value.
Which doesn't make any sense, since, according to this documentation hangoutsMeet
is an acceptable value:
- " eventHangout "消费者环聊( http://hangouts.google.com )
- " eventNamedHangout "适用于G Suite用户的传统环聊( http://hangouts.google.com )
- " hangoutsMeet "环聊聚会( http://meet.google.com )
- "eventHangout" for Hangouts for consumers (http://hangouts.google.com)
- "eventNamedHangout" for classic Hangouts for G Suite users (http://hangouts.google.com)
- "hangoutsMeet" for Hangouts Meet (http://meet.google.com)
有人知道为什么它会返回该错误吗?
Anybody have any idea why it could be returning that error?
推荐答案
此刻我正面临着同样的问题.我认为这实际上是由于您尝试插入事件的日历不接受"hangoutsMeet"电话会议类型而造成的.
I am facing the same problem at the moment.I believe it actually comes from the fact that the calendar where you try to insert the event does not accept the "hangoutsMeet" conference call type.
您可以通过使用API来获取日历设置详细信息,以在ConferenceProperties.allowedConferenceSolutionTypes中进行检查:- https://developers.google.com/calendar/v3/reference/calendars/get - https://developers.google.com/calendar/v3/reference/calendars#resource
You can check that by using the API to get the calendar setup details, in conferenceProperties.allowedConferenceSolutionTypes: - https://developers.google.com/calendar/v3/reference/calendars/get - https://developers.google.com/calendar/v3/reference/calendars#resource
对于我的特殊情况,我可以观察到日历仅支持"eventNamedHangout",而未列出"hangoutsMeet".
For my particular case, I can observe that the calendar only supports "eventNamedHangout", and "hangoutsMeet" is not listed.
话虽这么说,但我不知道如何真正确保特定的日历资源支持"hangoutsMeet"类型.
That being said, I have no idea about how to actually make sure the "hangoutsMeet" type is supported by a specific calendar resource.
修改
似乎我的问题出在我使用GCP服务帐户这一事实上-在这种情况下,我观察到的是仅支持eventNamedHangout类型.通过oauth舞蹈获得的具有access_token的API将完全相同的有效载荷发送给API时,hangoutsMeet变得可用.
It seems that my problem was coming from the fact I was using a GCP service account - in that case what I observe is that only the eventNamedHangout type is supported.When sending the very same payload to the API with an access_token obtained via the oauth dance, hangoutsMeet becomes available.
这篇关于创建日历事件时返回奇怪的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!