Reputation: 188
Everyone,
According this link, Microsoft Office365 Notification API, in order to create a simple webhook, i should do:
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"
}
and adding the access token in headers of course as well, i did try and each time i get the following result:
{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'}}
So basically, since i simply copy their examples, should i have to assume that their API documentation is outdated?
Thanks a lot for your answer
Upvotes: 1
Views: 471
Reputation: 17702
Yes, the beta endpoint was updated. You're likely in the transitional phase where it was renamed to changeType
. See http://blogs.msdn.com/b/exchangedev/archive/2015/10/21/outlook-rest-api-changes-to-beta-endpoint-part-iii.aspx for full details.
Upvotes: 1