Token
WebPushTokenPayload :
Parameter | Type | Required(*) | 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. |
└ auth | string | * | The authentication secret obtained from PushSubscription.getKey('auth'). Used 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. |
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"
}