The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/messaging > MessagePayload

MessagePayload interface

Message payload that contains the notification payload that is represented with NotificationPayload and the data payload that contains an arbitrary number of key-value pairs sent by developers through the Send API

Signature:

export interface MessagePayload 

Properties

Property Type Description
collapseKey string The collapse key of the message. See Non-collapsible and collapsible messages
data? (Optional) Arbitrary key/value payload.
fcmOptions? FcmOptions (Optional) Options for features provided by the FCM SDK for Web. See WebpushFcmOptions
from string The sender of this message.
notification? NotificationPayload (Optional) Display notification details. They are sent through the Send API