Push Notifications
The Channelize.io JavaScript SDK allows your users to receive important messages when the app is running in the background or a device is idle. You can also build your own Push Notifications system using Channelize.io webhooks.
Register FCM Token
Add the FCM files in Channelize.io Dashboard following the steps mentioned here.
Register the device/browser ID and FCM registration token on the Channelize.io server via
Channelize.PushNotification.registerFCMToken()
method to target a particular device to send a push notification.
By following the instructions of the FCM libraries, you can receive and handle push notifications.
NOTE: The same process you have to follow to configure Push Notifications in Channelize pre-built web UI SDK.
channelize.PushNotification.registerFCMToken(deviceId, token, function (err, res) {
});
Function Params
This table lists all possible parameters this function supports.
Name | Type | Description |
---|---|---|
deviceId | String | The unique ID of device or browser. |
token | String | Specifies the push notification token. You can generate this through FCM libraries. |
Callback Params
err
Indicates if there is an error. It will be null if there is no error.res
Indicates the response object having deviceId, token and userId.