Stay organized with collections
Save and categorize content based on your preferences.
Properties
collapseKey
collapseKey: string
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["# MessagePayload | JavaScript SDK\n\n- [firebase](/docs/reference/js/v8/firebase).\n- [messaging](/docs/reference/js/v8/firebase.messaging).\n- MessagePayload\n=======================================================================================================================\n\nMessage payload that contains the notification payload that is represented with\n[firebase.messaging.NotificationPayload](/docs/reference/js/v8/firebase.messaging.NotificationPayload) and the data payload that contains an arbitrary\nnumber of key-value pairs sent by developers through the\n[Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)\n\nIndex\n-----\n\n### Properties\n\n- [collapseKey](/docs/reference/js/v8/firebase.messaging.MessagePayload#collapsekey)\n- [data](/docs/reference/js/v8/firebase.messaging.MessagePayload#data)\n- [fcmOptions](/docs/reference/js/v8/firebase.messaging.MessagePayload#fcmoptions)\n- [from](/docs/reference/js/v8/firebase.messaging.MessagePayload#from)\n- [notification](/docs/reference/js/v8/firebase.messaging.MessagePayload#notification)\n\nProperties\n----------\n\n### collapseKey\n\ncollapseKey: string \nThe collapse key of this message. See\n[Collapsible and non-collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages).\n\n### Optional data\n\ndata: {} \nArbitrary key/value pairs. \n\n#### Type declaration\n\n-\n\n ##### \\[key: string\\]: string\n\n### Optional fcmOptions\n\nfcmOptions: [FcmOptions](/docs/reference/js/v8/firebase.messaging.FcmOptions) \nSee [firebase.messaging.FcmOptions](/docs/reference/js/v8/firebase.messaging.FcmOptions).\n\n### from\n\nfrom: string \nThe sender of this message.\n\n### Optional notification\n\nnotification: [NotificationPayload](/docs/reference/js/v8/firebase.messaging.NotificationPayload) \nSee [firebase.messaging.NotificationPayload](/docs/reference/js/v8/firebase.messaging.NotificationPayload)."]]
Message payload that contains the notification payload that is represented with firebase.messaging.NotificationPayload and the data payload that contains an arbitrary number of key-value pairs sent by developers through the Send API