每个人,
根据这个链接,Microsoft Office365 Notification API,为了创建一个简单的 webhook,我应该这样做:
POST https://outlook.office.com/api/beta/me/subscriptions HTTP/1.1
Content-Type: application/json
{
@odata.type:"#Microsoft.OutlookServices.PushSubscription",
ResourceURL: "https://outlook.office.com/api/beta/me/events",
CallbackURL: "https://webhook.azurewebsites.net/api/send/myNotifyClient",
ChangeType: "Created",
ClientState: "c75831bd-fad3-4191-9a66-280a48528679"
}
并在标题中添加访问令牌当然也是如此,我确实尝试过,每次我得到以下结果:
{u'error': {u'message': u"The property 'ChangeType' does not exist on type 'Microsoft.OutlookServices.PushSubscription'. Make sure to only use property names that are defined by the type.", u'code': u'RequestBodyRead'}}
所以基本上,既然我只是复制他们的例子,我是否应该假设他们的 API 文档已经过时了?
非常感谢您的回答