This document provides a reference for the HTTP syntax used to pass messages from your app server to client apps via Firebase Cloud Messaging. Your app server must direct all HTTP requests to this endpoint:
The available parameters and options fall into the following broad categories:
Downstream message syntax
This section gives the syntax for sending downstream messages and interpreting HTTP responses from Firebase Cloud Messaging.
Downstream HTTP messages (JSON)
The following table lists the targets, options, and payload for HTTP JSON messages.
This parameter specifies the recipient of a message.
The value can be a device's registration token, a device group's
notification key, or a single topic (prefixed with
|Optional, array of strings||
This parameter specifies the recipient of a multicast message, a message sent to more than one registration token.
The value should be an array of registration tokens to which to send the
multicast message. The array must contain at least 1 and at most 1000
registration tokens. To send a message to a single device, use the
Multicast messages are only allowed using the HTTP JSON format.
This parameter specifies a logical expression of conditions that determine the message target.
Supported condition: Topic, formatted as "'yourTopic' in topics". This value is case-insensitive.
This parameter is deprecated. Instead, use
This parameter identifies a group of messages (e.g., with
Note that there is no guarantee of the order in which messages get sent.
Note: A maximum of 4 different collapse keys is allowed at any given time. This means a FCM connection server can simultaneously store 4 different messages per client app. If you exceed this number, there is no guarantee which 4 collapse keys the FCM connection server will keep.
Sets the priority of the message. Valid values are "normal" and "high." On iOS, these correspond to APNs priorities 5 and 10.
By default, notification messages are sent with high priority, and data messages are sent with normal priority. Normal priority optimizes the client app's battery consumption and should be used unless immediate delivery is required. For messages with normal priority, the app may receive the message with unspecified delay.
When a message is sent with high priority, it is sent immediately, and the app can display a notification.
On iOS, use this field to represent