Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / Subscriber / subscribeToWebhook

subscribeToWebhook

fun subscribeToWebhook(type: Type, identifier: String, context: String, expirationDate: Date? = null, includesRevocation: Boolean = true, callback: WebcomResultCallback<Subscription>): Unit

Subscribes to a type of event on this data node until a given expirationDate and send notifications to a webhook.

The webhook is identified by its identifier (as edited in the Webcom developer console) and will be passed a given context. The subscription may be limited to a given expirationDate (if not, the Webcom back end uses the longest allowed duration for the subscription). If includesRevocation is true, the webhook will also be notified when the Webcom back end revokes the subscription.

The resulting Subscription is returned asynchronously using a callback function.

fun subscribeToWebhook(type: Type, identifier: String, context: String, duration: Duration, includesRevocation: Boolean = true, callback: WebcomResultCallback<Subscription>): Unit

Subscribes to a type of event on this data node for a given duration and send notifications to a webhook.

The webhook is identified by its identifier (as edited in the Webcom developer console) and will be passed a given context. If includesRevocation is true, the webhook will also be notified when the Webcom back end revokes the subscription.

The resulting Subscription is returned asynchronously using a callback function.