Stay organized with collections
Save and categorize content based on your preferences.
Firebase.Messaging.FirebaseMessage
Data structure used to send messages to, and receive messages from, cloud messaging.
Summary
Properties
|
CollapseKey
|
string
Gets 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
|
string
Gets the error code.
|
ErrorDescription
|
string
Gets the human readable details about the error.
|
From
|
string
Gets the authenticated ID of the sender. This is a project number in most cases.
|
Link
|
System.Uri
The link into the app from the message.
|
MessageId
|
string
Gets or sets the message ID.
|
MessageType
|
string
Gets the message type, equivalent with a content-type.
|
Notification
|
Optional notification to show.
|
NotificationOpened
|
bool
Gets a flag indicating whether this message was opened by tapping a notification in the OS system tray.
|
Priority
|
string
Gets the priority level.
|
RawData
|
byte[]
Gets the binary payload.
|
TimeToLive
|
System.TimeSpan
The Time To Live (TTL) for the message.
|
To
|
string
Gets or sets recipient of a message.
|
Properties
CollapseKey
string CollapseKey
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
and goog
prefixes are reserved for internal use.
Error
string Error
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
string ErrorDescription
Gets the human readable details about the error.
From
string From
Gets the authenticated ID of the sender. This is a project number in most cases.
Link
System.Uri Link
The link into the app from the message.
MessageId
string MessageId
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
string MessageType
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
FirebaseNotification Notification
Optional notification to show.
This only set if a notification was received with this message, otherwise it is null.
NotificationOpened
bool NotificationOpened
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
string Priority
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.TimeSpan TimeToLive
The Time To Live (TTL) for the message.
To
string To
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 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 2025-07-24 UTC.
[null,null,["Last updated 2025-07-24 UTC."],[],[],null,["# Firebase.Messaging.FirebaseMessage Class Reference\n\nFirebase.Messaging.FirebaseMessage\n==================================\n\nData structure used to send messages to, and receive messages from, cloud messaging.\n\nSummary\n-------\n\n| ### Properties ||\n|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CollapseKey](#class_firebase_1_1_messaging_1_1_firebase_message_1a1813fdabff5132597f19637bc8a287ce) | `string` Gets the collapse key used for collapsible messages. |\n| [Data](#class_firebase_1_1_messaging_1_1_firebase_message_1a33c57d728bd270b0552040e27f5f15f5) | `System.Collections.Generic.IDictionary\u003c string, string \u003e` Gets or sets the metadata, including all original key/value pairs. |\n| [Error](#class_firebase_1_1_messaging_1_1_firebase_message_1aca9e7419f1bac15e83a48ecddefe5e9a) | `string` Gets the error code. |\n| [ErrorDescription](#class_firebase_1_1_messaging_1_1_firebase_message_1a04e2ea03761de860cf9841c8ebef1754) | `string` Gets the human readable details about the error. |\n| [From](#class_firebase_1_1_messaging_1_1_firebase_message_1a2c2d9c9b194eed3ed2e0738c7c0d6df8) | `string` Gets the authenticated ID of the sender. This is a project number in most cases. |\n| [Link](#class_firebase_1_1_messaging_1_1_firebase_message_1afbfd085d9b4e82bad2d53c19152ea479) | `System.Uri` The link into the app from the message. |\n| [MessageId](#class_firebase_1_1_messaging_1_1_firebase_message_1a996cb34715974be19152a1e532d221b3) | `string` Gets or sets the message ID. |\n| [MessageType](#class_firebase_1_1_messaging_1_1_firebase_message_1ab507d2fc6d94bae37158bd24ed1d5bf7) | `string` Gets the message type, equivalent with a content-type. |\n| [Notification](#class_firebase_1_1_messaging_1_1_firebase_message_1aa10fa82f455d7186e3ed5b06872c4a3f) | [FirebaseNotification](/docs/reference/unity/class/firebase/messaging/firebase-notification#class_firebase_1_1_messaging_1_1_firebase_notification) Optional notification to show. |\n| [NotificationOpened](#class_firebase_1_1_messaging_1_1_firebase_message_1a0ed7d611a65bfbcafe254c0456bf6524) | `bool` Gets a flag indicating whether this message was opened by tapping a notification in the OS system tray. |\n| [Priority](#class_firebase_1_1_messaging_1_1_firebase_message_1aa3324ea881382e7053cf315bcc25f6ae) | `string` Gets the priority level. |\n| [RawData](#class_firebase_1_1_messaging_1_1_firebase_message_1a8d84ca587ee5a89103f5e7180228733b) | `byte[]` Gets the binary payload. |\n| [TimeToLive](#class_firebase_1_1_messaging_1_1_firebase_message_1a9b5f82155558871f6293fc841765ac2e) | `System.TimeSpan` The Time To Live (TTL) for the message. |\n| [To](#class_firebase_1_1_messaging_1_1_firebase_message_1a5e435662062e96c344d9ad302810c71c) | `string` Gets or sets recipient of a message. |\n\nProperties\n----------\n\n### CollapseKey\n\n```c#\nstring CollapseKey\n``` \nGets the collapse key used for collapsible messages. \n\n### Data\n\n```c#\nSystem.Collections.Generic.IDictionary\u003c string, string \u003e Data\n``` \nGets or sets the metadata, including all original key/value pairs.\n\nIncludes some of the HTTP headers used when sending the message. `gcm`, `google` and `goog` prefixes are reserved for internal use. \n\n### Error\n\n```c#\nstring Error\n``` \nGets the error code.\n\nUsed in \"nack\" messages for CCS, and in responses from the server. See the CCS specification for the externally-supported list. \n\n### ErrorDescription\n\n```c#\nstring ErrorDescription\n``` \nGets the human readable details about the error. \n\n### From\n\n```c#\nstring From\n``` \nGets the authenticated ID of the sender. This is a project number in most cases. \n\n### Link\n\n```c#\nSystem.Uri Link\n``` \nThe link into the app from the message. \n\n### MessageId\n\n```c#\nstring MessageId\n``` \nGets or sets the message ID.\n\nThis 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. \n\n### MessageType\n\n```c#\nstring MessageType\n``` \nGets the message type, equivalent with a content-type.\n\nCCS uses \"ack\", \"nack\" for flow control and error handling. \"control\" is used by CCS for connection control. \n\n### Notification\n\n```c#\nFirebaseNotification Notification\n``` \nOptional notification to show.\n\nThis only set if a notification was received with this message, otherwise it is null. \n\n### NotificationOpened\n\n```c#\nbool NotificationOpened\n``` \nGets a flag indicating whether this message was opened by tapping a notification in the OS system tray.\n\nIf the message was received this way this flag is set to true. \n\n### Priority\n\n```c#\nstring Priority\n``` \nGets the priority level.\n\nDefined values are \"normal\" and \"high\". By default messages are sent with normal priority. \n\n### RawData\n\n```c#\nbyte[] RawData\n``` \nGets the binary payload.\n\nFor webpush and non-json messages, this is the body of the request entity. \n\n### TimeToLive\n\n```c#\nSystem.TimeSpan TimeToLive\n``` \nThe Time To Live (TTL) for the message. \n\n### To\n\n```c#\nstring To\n``` \nGets or sets recipient of a message.\n\nFor example it can be a registration token, a topic name, a IID or project ID."]]