1

每个人,

根据这个链接,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 文档已经过时了?

非常感谢您的回答

4

1 回答 1

1

是的,Beta 端点已更新。您可能正处于将其重命名为changeType. 有关完整详细信息,请参阅http://blogs.msdn.com/b/exchangedev/archive/2015/10/21/outlook-rest-api-changes-to-beta-endpoint-part-iii.aspx

于 2015-10-28T15:58:50.183 回答