我通过了具有权限的经典 oAuth 流程Calendars.ReadWrite
和offline_access
,这应该足以创建订阅。
现在我得到了用户的日历列表(通过 api),当我尝试从这些日历中的任何一个请求订阅事件时,如下所示:
POST /v1.0/me/subscriptions HTTP/1.1 Accept: */* Content-Type: application/json
{
"changeType": "created,deleted,updated",
"notificationURL": "https://...",
"resource": "/me/calendars/{id}/events",
"expirationDateTime": "2019-08-15T00:00Z",
"clientState": "..."
}
(甚至"resource": ,"/me/events"
)
我得到回应:
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
我在这里做错了什么?