Outlook Webhook通知订阅 [英] Outlook webhook notification subscription

查看:416
本文介绍了Outlook Webhook通知订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在代码中实现了Outlook Notification Rest API,它的工作正常,但是今天突然失败了,并给了我400错误.

I already implemented outlook notification rest api into my code and its work fine but today it suddenly failed and gives me 400 error.

请求创建通知订阅的展望 输出::

Request outlook for create subscription for notification Output::

{"error":{"code":"ErrorInvalidParameter","message":"The parameter 'Resource' is invalid."}}

我的帖子数据如下: 网址=> outlook.office.com/api/v2.0/me/subscriptions

My post data as below :: URL => outlook.office.com/api/v2.0/me/subscriptions

$ subscriptionParameters = json_encode(array( "@ odata.type" =>#Microsoft.OutlookServices.PushSubscription", 资源" =>" https://outlook.office.com/api/v2 .0/me/events ",
"NotificationURL" =>" https://mydomain/acceptnotification.php ", "ChangeType" =>已创建,已更新,已删除", "ClientState" =>"c75831bd-fad3-4191-9a66-280a48528679" ));

$subscriptionParameters = json_encode(array( "@odata.type" => "#Microsoft.OutlookServices.PushSubscription", "Resource" => "https://outlook.office.com/api/v2.0/me/events",
"NotificationURL" => "https://mydomain/acceptnotification.php", "ChangeType" => "Created, Updated, Deleted", "ClientState" => "c75831bd-fad3-4191-9a66-280a48528679" ));

使用cUrl使用access_token和电子邮件地址将上述数据传递到Outlook

Pass above data to outlook with access_token and email address using cUrl

请建议我.

推荐答案

感谢您报告此问题. Microsoft工程团队正在对此进行调查.同时,一种适用于多种订阅情况的解决方法是对资源属性使用相对URL

Thank you for reporting this issue. Microsoft engineering team is investigating it right now. Meanwhile, a workaround that worked for multiple subscription cases is to use relative URL for the resource property

例如

资源":我/事件",

谢谢.

这篇关于Outlook Webhook通知订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆