1
votes

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."}}

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

$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" ));

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

Please suggest me.

1

1 Answers

1
votes

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

e.g.

"Resource": "me/events",

Thanks.