I am subscribing to EWS push notifications for calendar events and to log notifications.
I am using PHP-EWS: jamesiarmes/php-ews and Symfony 4.1
To subscribe, I'm using this code:
$eventTypes = new NonEmptyArrayOfNotificationEventTypesType();
$eventTypes->EventType[] = NotificationEventTypeType::CREATED_EVENT;
$eventTypes->EventType[] = NotificationEventTypeType::MODIFIED_EVENT;
$eventTypes->EventType[] = NotificationEventTypeType::DELETED_EVENT;
$eventTypes->EventType[] = NotificationEventTypeType::COPIED_EVENT;
$eventTypes->EventType[] = NotificationEventTypeType::MOVED_EVENT;
$folderIDs = new NonEmptyArrayOfBaseFolderIdsType();
$folderIDs->DistinguishedFolderId = new DistinguishedFolderIdType();
$folderIDs->DistinguishedFolderId->Id = DistinguishedFolderIdNameType::CALENDAR;
$pushSubscription = new PushSubscriptionRequestType();
$pushSubscription->FolderIds = $folderIDs;
$pushSubscription->EventTypes = $eventTypes;
$pushSubscription->StatusFrequency = $this->statusFrequency;
$pushSubscription->URL = $this->subscriptionUrl;
$subscribe_request = new SubscribeType();
$subscribe_request->PushSubscriptionRequest = $pushSubscription;
At te present time, when I book a meeting I receive this notification:
{
"SubscriptionId": "xxxxxxxx",
"PreviousWatermark": "xxxxxxxx",
"MoreEvents": "false",
"CreatedEvent": {
"Watermark": "xxxxx",
"TimeStamp": "2018-08-13T13:18:12Z",
"ItemId": "",
"ParentFolderId": ""
},
"ModifiedEvent": [
{
"Watermark": "xxxxxxx",
"TimeStamp": "2018-08-13T13:18:13Z",
"ItemId": "",
"ParentFolderId": ""
},
{
"Watermark": "xxxxxxx",
"TimeStamp": "2018-08-13T13:18:13Z",
"FolderId": "",
"ParentFolderId": ""
}
]
}
My problem is that I don't receive the ´ItemId´ or the ´ParentFolderId´. How can I receive these on the notification or how can I get the meeting that has been created?