Firebase. Messaging. FirebaseMessage
Data structure used to send messages to, and receive messages from, cloud messaging.
Summary
Properties | |
|---|---|
CollapseKey | stringGets the collapse key used for collapsible messages. |
Data | System.Collections.Generic.IDictionary< string, string >Gets or sets the metadata, including all original key/value pairs. |
Error | stringGets the error code. |
ErrorDescription | stringGets the human readable details about the error. |
From | stringGets the authenticated ID of the sender. This is a project number in most cases. |
Link | System.UriThe link into the app from the message. |
MessageId | stringGets or sets the message ID. |
MessageType | stringGets the message type, equivalent with a content-type. |
Notification | Optional notification to show. |
NotificationOpened | boolGets a flag indicating whether this message was opened by tapping a notification in the OS system tray. |
Priority | stringGets the priority level. |
RawData | byte[]Gets the binary payload. |
TimeToLive | System.TimeSpanThe Time To Live (TTL) for the message. |
To | stringGets or sets recipient of a message. |
Properties
CollapseKey
stringCollapseKey
Gets the collapse key used for collapsible messages.
Data
System.Collections.Generic.IDictionary<string,string>Data
Gets or sets the metadata, including all original key/value pairs.
Includes some of the HTTP headers used when sending the message.gcm,google andgoog prefixes are reserved for internal use.
Error
stringError
Gets the error code.
Used in "nack" messages for CCS, and in responses from the server. See the CCS specification for the externally-supported list.
ErrorDescription
stringErrorDescription
Gets the human readable details about the error.
From
stringFrom
Gets the authenticated ID of the sender. This is a project number in most cases.
Link
System.UriLink
The link into the app from the message.
MessageId
stringMessageId
Gets or sets the message ID.
This can be specified by sender. Internally a hash of the message ID and other elements will be used for storage. The ID must be unique for each topic subscription - using the same ID may result in overriding the original message or duplicate delivery.
MessageType
stringMessageType
Gets the message type, equivalent with a content-type.
CCS uses "ack", "nack" for flow control and error handling. "control" is used by CCS for connection control.
Notification
FirebaseNotificationNotification
Optional notification to show.
This only set if a notification was received with this message, otherwise it is null.
NotificationOpened
boolNotificationOpened
Gets a flag indicating whether this message was opened by tapping a notification in the OS system tray.
If the message was received this way this flag is set to true.
Priority
stringPriority
Gets the priority level.
Defined values are "normal" and "high". By default messages are sent with normal priority.
RawData
byte[]RawData
Gets the binary payload.
For webpush and non-json messages, this is the body of the request entity.
TimeToLive
System.TimeSpanTimeToLive
The Time To Live (TTL) for the message.
To
stringTo
Gets or sets recipient of a message.
For example it can be a registration token, a topic name, a IID or project ID.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-24 UTC.