voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
25 lines (16 loc) • 1.8 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/messaging](./messaging.md) > [MessagePayload](./messaging.messagepayload.md)
## MessagePayload interface
Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging.notificationpayload.md) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)
<b>Signature:</b>
```typescript
export interface MessagePayload
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [collapseKey](./messaging.messagepayload.collapsekey.md) | string | The collapse key of the message. See [Non-collapsible and collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages) |
| [data?](./messaging.messagepayload.data.md) | { \[key: string\]: string; } | <i>(Optional)</i> Arbitrary key/value payload. |
| [fcmOptions?](./messaging.messagepayload.fcmoptions.md) | [FcmOptions](./messaging.fcmoptions.md) | <i>(Optional)</i> Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions) |
| [from](./messaging.messagepayload.from.md) | string | The sender of this message. |
| [notification?](./messaging.messagepayload.notification.md) | [NotificationPayload](./messaging.notificationpayload.md) | <i>(Optional)</i> Display notification details. They are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification) |