SubscribeToPushNotificationsWithCallerData method
Subscribes to push notifications. Calling this method results in a call to EWS.
The Ids of the folder to subscribe to.
The URL of the Web Service endpoint the Exchange server should push events to.
The frequency, in minutes, at which the Exchange server should contact the Web Service endpoint. Frequency must be between 1 and 1440.
An optional watermark representing a previously opened subscription.
Optional caller data that will be returned the call back.
The event types to subscribe to.
Implementation
Future<PushSubscription> SubscribeToPushNotificationsWithCallerData(
Iterable<FolderId> folderIds,
Uri url,
int frequency,
String? watermark,
String? callerData,
List<EventType> eventTypes,
) async {
EwsUtilities.ValidateParamCollection(folderIds, "folderIds");
return (await BuildSubscribeToPushNotificationsRequest(
folderIds,
url,
frequency,
watermark,
callerData,
null,
// AnchorMailbox
eventTypes,
).Execute())[0].Subscription!;
}