ExchangeService.SubscribeToPushNotifications method (IEnumerable<FolderId>, Uri, Int32, String, String, EventType[])

Initiates a request to receive push notifications that includes a request for additional information to be returned in the push notification response.

The SubscribeToPushNotifications(IEnumerable<FolderId>, Uri, Int32, String, String, []) method is applicable for clients that target Exchange Online and versions of Exchange starting with Exchange Server 2013.

Namespace:  Microsoft.Exchange.WebServices.Data
Assembly:  Microsoft.Exchange.WebServices (in Microsoft.Exchange.WebServices.dll)

public PushSubscription SubscribeToPushNotifications(
	IEnumerable<FolderId> folderIds,
	Uri url,
	int frequency,
	string watermark,
	string callerData,
	params EventType[] eventTypes


Type: System.Collections.Generic.IEnumerable<FolderId>

The IDs of the folder to subscribe to.

Type: System.Uri

The URL of the web service endpoint the Exchange server should push events to.

Type: System.Int32

The frequency, in minutes, at which the Exchange server should contact the web service endpoint. This value must be between 1 and 1440.

Type: System.String

An optional watermark representing a previously opened subscription.

Type: System.String

Optional information that the caller requests be returned in the push notification response.

Type: []

The types of event to subscribe to.

Return value

Type: Microsoft.Exchange.WebServices.Data.PushSubscription
A collection of notification objects.

Calling this method results in a call to Exchange Web Services (EWS).