我正在尝试订阅来自 Outlook 邮件 API 的通知。但是我不断收到 400 错误。参考:msdn.microsoft.com/en-us/office/office365/api/notify-rest-operations
$url = 'outlook.office.com/api/v2.0/me/subscriptions';
$headers = array(
"Authorization: Bearer ".$access_token ,
"Accept: application/json",
"X-AnchorMailbox: ".$user_email
);
$curl = curl_init($url);
$data = '{
"@odata.type":"#Microsoft.OutlookServices.PushSubscription",
"Resource": "outlook.office.com/api/v2.0/me/messages",
"NotificationURL": "mydomain.com/listener.php",
"ChangeType": "Created"
}';
$headers[] = "Content-Type: application/json";
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS,$data);
$response = curl_exec($curl);
我还没有设置我的监听器。400错误是因为监听器吗?或者是别的什么?。好像认证成功了