Google API日历:403禁止,错误为“ disallowedFieldMutation”

时间:2019-10-22 06:34:31

标签: google-calendar-api

我的网站允许我的用户将其日历与Google同步。自多年以来一直运行良好,但是自两周以来,Google在未知的情况下返回错误“ disallowedFieldMutation ” ...

例如,PUT请求修改Google中的事件:

PUT /calendar/v3/calendars/xxxxx%40gmail.com/events/_68o32xxxxx?oauth_token=ya29.xxxxx HTTP/1.1
Host: www.googleapis.com
Accept: */*
User-Agent: Mozilla/5.0 (X11; xxx)
Connection: Close
Content-Type: application/json; charset=UTF-8
Content-Length: xxx
If-Match: *
{"id":"_68o32xxxxx", "updated":"2019-10-17T14:59:18.000Z", "sequence":1571324360, "kind":"calendar#event", "summary":"Test", "description":"", "status":"confirmed", "start":{"date":"2017-05-06"},  "end":{"date":"2017-05-08"}, "reminders":{"useDefault":false,"overrides":[]}, "visibility":"private", "location":""}

响应如下:

HTTP/1.1 403 Forbidden
...
{
"error": {
"errors": [
{
"domain": "calendar",
"reason": "disallowedFieldMutation",
"message": "Insufficient permissions to modify a field on the resource."
}
],
"code": 403,
"message": "Insufficient permissions to modify a field on the resource."
}
}

有人有解决方案吗?也许是尝试更新共享日历?

0 个答案:

没有答案