Office365通知API未更新,属性“ChangeType”不存在

时间:2015-10-28 15:45:12

标签: office365 office365api outlook-restapi

每个人,

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

非常感谢您的回答

1 个答案:

答案 0 :(得分:1)

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