Web Push Channel Provider
Configuration
To configure the Web Push integration, you'll need the following data:
| Parameter | Type | Description |
|---|---|---|
| public_key | string * | VAPID public key - generate one at https://magicbell.com/web-push/vapid-keys. |
| private_key | string * | VAPID private key - from the pair you generated. |
In the Dashboard
The easiest way to configure this integration is through the MagicBell dashboard:
- Log in to your MagicBell dashboard.
- Navigate to Channels.
- Find and click on this channel name in the sidebar.
- Click the Configure Web Push button.
- Follow the on-screen instructions to complete the configuration.

Using the API
You can also configure the integration using the API.
Example payload:
{
"public_key": "BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw",
"private_key": "y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"
}
Channel Token
The channel token contains all the information (along with the config) necessary to deliver the notification on the Web Push channel.
| Parameter | Type | Description |
|---|---|---|
| endpoint | string * | The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. |
| keys | object * | The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. |
| └ p256dh | string * | The P-256 ECDH public key obtained from PushSubscription.getKey('p256dh'). Used to encrypt push messages for this subscription. |
| └ auth | string * | The authentication secret obtained from PushSubscription.getKey('auth'). Used to encrypt push messages for this subscription. |
Example
{
"endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
"keys": {
"auth": "GoIO2ulhtQuyBM64lZuFuw",
"p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
}
}Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"endpoint": {
"description": "The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to.",
"format": "uri",
"type": "string"
},
"keys": {
"description": "The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription.",
"properties": {
"auth": {
"contentEncoding": "base64",
"description": "The authentication secret obtained from PushSubscription.getKey('auth'). Used to encrypt push messages for this subscription.",
"type": "string"
},
"p256dh": {
"contentEncoding": "base64",
"description": "The P-256 ECDH public key obtained from PushSubscription.getKey('p256dh'). Used to encrypt push messages for this subscription.",
"type": "string"
}
},
"required": [
"p256dh",
"auth"
],
"type": "object"
}
},
"required": [
"endpoint",
"keys"
],
"type": "object"
}