【发布时间】:2019-08-14 15:46:45
【问题描述】:
我使用权限 Calendars.ReadWrite 和 offline_access 完成了经典的 oAuth 流程,这应该足以创建订阅。
现在我得到了用户的日历列表(通过 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.
我在这里做错了什么?
【问题讨论】:
标签: microsoft-graph-api microsoft-graph-calendar