Office365通知API未更新,属性'ChangeType'不存在
Office365 Notification API not updated, property 'ChangeType' does not exist
各位,
根据这个 link、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"
}
并在 headers 中添加访问令牌,当然,
我确实尝试过,每次我得到以下结果:
{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 文档已经过时了?
非常感谢您的回答
是的,测试端点已更新。您可能正处于重命名为 changeType
的过渡阶段。有关详细信息,请参阅 http://blogs.msdn.com/b/exchangedev/archive/2015/10/21/outlook-rest-api-changes-to-beta-endpoint-part-iii.aspx。
各位,
根据这个 link、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"
}
并在 headers 中添加访问令牌,当然, 我确实尝试过,每次我得到以下结果:
{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 文档已经过时了?
非常感谢您的回答
是的,测试端点已更新。您可能正处于重命名为 changeType
的过渡阶段。有关详细信息,请参阅 http://blogs.msdn.com/b/exchangedev/archive/2015/10/21/outlook-rest-api-changes-to-beta-endpoint-part-iii.aspx。