Stay organized with collections
Save and categorize content based on your preferences.
FirebaseAdmin.Messaging.Message
Represents a message that can be sent via Firebase Cloud Messaging (FCM).
Summary
Contains payload information as well as the recipient information. The recipient information must be specified by setting exactly one of the Token, Topic or Condition fields.
Properties
|
Android
|
Gets or sets the Android-specific information to be included in the message.
|
Apns
|
Gets or sets the APNs-specific information to be included in the message.
|
Condition
|
string
Gets or sets the FCM condition to which the message should be sent.
|
Data
|
IReadOnlyDictionary< string, string >
Gets or sets a collection of key-value pairs that will be added to the message as data fields.
|
FcmOptions
|
Gets or sets the FCM options to be included in the message.
|
Notification
|
Gets or sets the notification information to be included in the message.
|
Token
|
string
Gets or sets the registration token of the device to which the message should be sent.
|
Topic
|
string
Gets or sets the name of the FCM topic to which the message should be sent.
|
Webpush
|
Gets or sets the Webpush-specific information to be included in the message.
|
Properties
Android
AndroidConfig Android
Gets or sets the Android-specific information to be included in the message.
Apns
ApnsConfig Apns
Gets or sets the APNs-specific information to be included in the message.
Condition
string Condition
Gets or sets the FCM condition to which the message should be sent.
Must be a valid condition string such as "'foo' in topics"
.
Data
IReadOnlyDictionary< string, string > Data
Gets or sets a collection of key-value pairs that will be added to the message as data fields.
Keys and the values must not be null.
FcmOptions
FcmOptions FcmOptions
Gets or sets the FCM options to be included in the message.
Notification
Notification Notification
Gets or sets the notification information to be included in the message.
Token
string Token
Gets or sets the registration token of the device to which the message should be sent.
Topic
string Topic
Gets or sets the name of the FCM topic to which the message should be sent.
Topic names may contain the /topics/
prefix.
Webpush
WebpushConfig Webpush
Gets or sets the Webpush-specific information to be included in the message.
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-03-24 UTC.
[null,null,["Last updated 2022-03-24 UTC."],[],[],null,["# FirebaseAdmin.Messaging.Message Class Reference\n\nFirebaseAdmin.Messaging.Message\n===============================\n\nRepresents a message that can be sent via Firebase Cloud [Messaging](/docs/reference/admin/dotnet/namespace/firebase-admin/messaging#namespace_firebase_admin_1_1_messaging) (FCM).\n\nSummary\n-------\n\nContains payload information as well as the recipient information. The recipient information must be specified by setting exactly one of the [Token](/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a46ff329980e0a7c781f613662a36bc47), [Topic](/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a0ac14aae4cec3b8e5dfbf83c05b8fc61) or [Condition](/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a6d1ea27a99dc64d81b3ba4fa76800e7d) fields.\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Android](#class_firebase_admin_1_1_messaging_1_1_message_1ab269ce2d0bd0a8e702ca53acc74105e6) | [AndroidConfig](/docs/reference/admin/dotnet/class/firebase-admin/messaging/android-config#class_firebase_admin_1_1_messaging_1_1_android_config) Gets or sets the Android-specific information to be included in the message. |\n| [Apns](#class_firebase_admin_1_1_messaging_1_1_message_1a008d7023bec1b3cbbda1efba780ee57d) | [ApnsConfig](/docs/reference/admin/dotnet/class/firebase-admin/messaging/apns-config#class_firebase_admin_1_1_messaging_1_1_apns_config) Gets or sets the APNs-specific information to be included in the message. |\n| [Condition](#class_firebase_admin_1_1_messaging_1_1_message_1a6d1ea27a99dc64d81b3ba4fa76800e7d) | `string` Gets or sets the FCM condition to which the message should be sent. |\n| [Data](#class_firebase_admin_1_1_messaging_1_1_message_1a60de8969556aba3ad8bef3726ba474b4) | `IReadOnlyDictionary\u003c string, string \u003e` Gets or sets a collection of key-value pairs that will be added to the message as data fields. |\n| [FcmOptions](#class_firebase_admin_1_1_messaging_1_1_message_1a41b3dd406f297e6e23f001bc53d7738b) | [FcmOptions](/docs/reference/admin/dotnet/class/firebase-admin/messaging/fcm-options#class_firebase_admin_1_1_messaging_1_1_fcm_options) Gets or sets the FCM options to be included in the message. |\n| [Notification](#class_firebase_admin_1_1_messaging_1_1_message_1a33d3be0f16d59b644fea8ee7a1f94459) | [Notification](/docs/reference/admin/dotnet/class/firebase-admin/messaging/notification#class_firebase_admin_1_1_messaging_1_1_notification) Gets or sets the notification information to be included in the message. |\n| [Token](#class_firebase_admin_1_1_messaging_1_1_message_1a46ff329980e0a7c781f613662a36bc47) | `string` Gets or sets the registration token of the device to which the message should be sent. |\n| [Topic](#class_firebase_admin_1_1_messaging_1_1_message_1a0ac14aae4cec3b8e5dfbf83c05b8fc61) | `string` Gets or sets the name of the FCM topic to which the message should be sent. |\n| [Webpush](#class_firebase_admin_1_1_messaging_1_1_message_1aaa78bf326fcb498fe16749a4fb38a5ee) | [WebpushConfig](/docs/reference/admin/dotnet/class/firebase-admin/messaging/webpush-config#class_firebase_admin_1_1_messaging_1_1_webpush_config) Gets or sets the Webpush-specific information to be included in the message. |\n\nProperties\n----------\n\n### Android\n\n```text\nAndroidConfig Android\n``` \nGets or sets the Android-specific information to be included in the message. \n\n### Apns\n\n```text\nApnsConfig Apns\n``` \nGets or sets the APNs-specific information to be included in the message. \n\n### Condition\n\n```text\nstring Condition\n``` \nGets or sets the FCM condition to which the message should be sent.\n\nMust be a valid condition string such as `\"'foo' in topics\"`. \n\n### Data\n\n```text\nIReadOnlyDictionary\u003c string, string \u003e Data\n``` \nGets or sets a collection of key-value pairs that will be added to the message as data fields.\n\nKeys and the values must not be null. \n\n### FcmOptions\n\n```text\nFcmOptions FcmOptions\n``` \nGets or sets the FCM options to be included in the message. \n\n### Notification\n\n```text\nNotification Notification\n``` \nGets or sets the notification information to be included in the message. \n\n### Token\n\n```text\nstring Token\n``` \nGets or sets the registration token of the device to which the message should be sent. \n\n### Topic\n\n```text\nstring Topic\n``` \nGets or sets the name of the FCM topic to which the message should be sent.\n\nTopic names may contain the `/topics/` prefix. \n\n### Webpush\n\n```text\nWebpushConfig Webpush\n``` \nGets or sets the Webpush-specific information to be included in the message."]]