FCMRequest

Targets, options, and payload for downstream HTTP messages (JSON).

https://firebase.google.com/docs/cloud-messaging/http-server-ref#table1

Members

Variables

collapseKey
Nullable!string collapseKey;

This parameter identifies a group of messages (e.g., with

condition
Nullable!string condition;

This parameter specifies a logical expression of conditions that determine the message target.

contentAvailable
Nullable!bool contentAvailable;

On iOS, use this field to represent content-available in the APNs payload. When a notification or message is sent and this is set to true, an inactive client app is awoken. On Android, data messages wake the app by default. On Chrome, currently not supported.

data
Nullable!JSONValue data;

This parameter specifies the custom key-value pairs of the message's payload.

dryRun
Nullable!bool dryRun;

This parameter, when set to true, allows developers to test a request without actually sending a message.

notification
Nullable!JSONValue notification;

This parameter specifies the predefined, user-visible key-value pairs of the notification payload. See Notification payload support for detail. For more information about notification message and data message options, see Payload: https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages

notificationKey
deprecated Nullable!string notificationKey;

This parameter is deprecated. Instead, use to to specify message recipients. For more information on how to send messages to multiple devices, see the documentation for your platform.

priority
Nullable!string priority;

Sets the priority of the message. Valid values are "normal" and "high." On iOS, these correspond to APNs priorities 5 and 10.

registrationIds
string[] registrationIds;

This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration tokens.

restrictedPackageName
Nullable!string restrictedPackageName;

This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.

timeToLive
Nullable!int timeToLive;

This parameter specifies how long (in seconds) the message should be kept in FCM storage if the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks. For more information, see Setting the lifespan of a message.

to
Nullable!string to;

This parameter specifies the recipient of a message.

Meta