【发布时间】:2017-05-08 07:27:58
【问题描述】:
我需要从日历 ID 中获取日历名称。我提供了正确的 Google 日历 ID 并通过 api 发送它以获取日历详细信息并获取日历名称。
https://www.googleapis.com/calendar/v3/calendars/en.indian#holiday@group.v.calendar.google.com
Method type: GET
Content-Type: application/json
Authorization: Bearer <latest access_token>
我已经在线使用 Google Calendar API 进行了检查,它工作正常。但是当我通过邮递员或在我的 java 代码中传递它时,会收到以下 json。
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
此错误仅在我提供默认日历 ID 时发生,例如 en.indian#holiday@group.v.calendar.google.com(Holidays in India)
【问题讨论】:
-
日历列表的正确调用是googleapis.com/calendar/v3/users/me/calendarList,它将显示您在日历列表中安装的日历。你不能给它一个日历。你到底想做什么?
-
我想从日历 ID en.indian#holiday@group.v.calendar.google.com 中获取日历名称
-
请编辑您的问题并包含stackoverflow.com/help/mcve
标签: google-api google-apis-explorer google-calendar-api