首页 > 解决方案 > google calendar api 说 400 bad request 由于无效值(会议属性)

问题描述

我正在尝试calendarList使用谷歌日历 api v3 插入。请求正文包含 conferenceProperties允许conferenceProperties.allowedConferenceSolutionTypes[]列表{eventHangout,eventNamedHangout,hangoutsMeet}

当我尝试使用任何一个插入时 conferenceProperties.allowedConferenceSolutionTypes[],请求会抛出“400 bad request”。但幸运的是,当请求不包含conferenceProperties.allowedConferenceSolutionTypes[].

为什么我不能选择“eventHangout”作为conferenceProperties.allowedConferenceSolutionTypes[]

Error: 400 bad request
"domain": "global",
"reason": "invalid",
"message": "Invalid Value"


HTTP: POST
https://www.googleapis.com/calendar/v3/users/me/calendarList
request body: 
{
  "id": "XXX@group.calendar.google.com",
  "kind": "calendar#calendarListEntry",
  "summaryOverride": "",
  "colorId": "18",
  "backgroundColor": "#b99aff",
  "foregroundColor": "#000000",
  "selected": false,
  "hidden": false,
  "conferenceProperties": {
    "allowedConferenceSolutionTypes": [
      "eventHangout"
    ]
  }
}

标签: javaapirestgoogle-calendar-api

解决方案


eventHangout只是消费者帐户的有效值,而作为 Gsuite 用户,您需要选择一个eventNamedHangout.

请参阅此处的文档:

在此处输入图像描述 还有这个问题


推荐阅读