我尝试从日历示例中获取事件列表here https://developers.google.com/calendar/api/v3/reference/events/list。
无论我选择哪一处房产
使用时,我总是收到 404“未找到”错误。任何人都可以阐明这一点吗?非常感谢。
Request.
POST https://www.googleapis.com/calendar/v3/calendars/[email protected] /cdn-cgi/l/email-protection/events?
key=AIzaSyCGRPF0wSSBLndqdUftlbsDH9emHD_S-qg
Accept: "application/json"
Authorization: Bearer ya29.a0ARrdaM9PPHndl040qaXFmoSFGT9yRPWZs_yrTnYLAHQ0GF-UBvGc67S2L1m0O5OFIilq8oVGRuvw29NFwomtmUTBeHoABcIlaVD_p--4NVlBWCcXLBgfDjsF_5tvt4XRShd1itpe_9CULan9x6BV4TOyP__TkQ
Response
Response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "not Found",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
首先事件列表 https://developers.google.com/calendar/api/v3/reference/events/list不是 HTTP Post,而是 HTTP GET
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events
其次假设您只是错过了写的帖子,而您实际上正在执行 http get。
未找到意味着当前经过身份验证的用户无权访问您尝试请求事件的日历。在这种情况下[email protected] /cdn-cgi/l/email-protection
我建议使用 Primary 来测试您是否可以获得当前经过身份验证的用户主日历。
GET https://www.googleapis.com/calendar/v3/calendars/primary/events
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)