The app associated with the current Messaging service
instance.
Sends the given message via FCM.
The message payload.
Whether to send the message in the dry-run (validation only) mode.
A promise fulfilled with a unique message ID string after the message has been successfully handed off to the FCM service for delivery.
Sends all the messages in the given array via Firebase Cloud Messaging.
Employs batching to send the entire list as a single RPC call. Compared
to the send() method, this method is a significantly more efficient way
to send multiple messages.
The responses list obtained from the return value
corresponds to the order of tokens in the MulticastMessage. An error
from this method indicates a total failure -- i.e. none of the messages in
the list could be sent. Partial failures are indicated by a BatchResponse
return value.
A non-empty array containing up to 100 messages.
Whether to send the messages in the dry-run (validation only) mode.
A Promise fulfilled with an object representing the result of the send operation.
Sends the given multicast message to all the FCM registration tokens specified in it.
This method uses the sendAll() API under the hood to send the given
message to all the target recipients. The responses list obtained from the
return value corresponds to the order of tokens in the MulticastMessage.
An error from this method indicates a total failure -- i.e. the message was
not sent to any of the tokens in the list. Partial failures are indicated by
a BatchResponse return value.
A multicast message containing up to 100 tokens.
Whether to send the message in the dry-run (validation only) mode.
A Promise fulfilled with an object representing the result of the send operation.
Sends an FCM message to a condition.
See Send to a condition for code samples and detailed documentation.
The condition determining to which topics to send the message.
The message payload.
Optional options to alter the message.
A promise fulfilled with the server's response after the message has been sent.
Sends an FCM message to a single device corresponding to the provided registration token.
See
Send to individual devices
for code samples and detailed documentation. Takes either a
registrationToken to send to a single device or a
registrationTokens parameter containing an array of tokens to send
to multiple devices.
A device registration token or an array of device registration tokens to which the message should be sent.
The message payload.
Optional options to alter the message.
A promise fulfilled with the server's response after the message has been sent.
Sends an FCM message to a device group corresponding to the provided notification key.
See Send to a device group for code samples and detailed documentation.
The notification key for the device group to which to send the message.
The message payload.
Optional options to alter the message.
A promise fulfilled with the server's response after the message has been sent.
Sends an FCM message to a topic.
See Send to a topic for code samples and detailed documentation.
The topic to which to send the message.
The message payload.
Optional options to alter the message.
A promise fulfilled with the server's response after the message has been sent.
Subscribes a device to an FCM topic.
See Subscribe to a topic for code samples and detailed documentation. Optionally, you can provide an array of tokens to subscribe multiple devices.
A token or array of registration tokens for the devices to subscribe to the topic.
The topic to which to subscribe.
A promise fulfilled with the server's response after the device has been subscribed to the topic.
Unsubscribes a device from an FCM topic.
See Unsubscribe from a topic for code samples and detailed documentation. Optionally, you can provide an array of tokens to unsubscribe multiple devices.
A device registration token or an array of device registration tokens to unsubscribe from the topic.
The topic from which to unsubscribe.
A promise fulfilled with the server's response after the device has been unsubscribed from the topic.
Generated using TypeDoc
Gets the
Messagingservice for the current app.var messaging = app.messaging(); // The above is shorthand for: // var messaging = admin.messaging(app);The
Messagingservice for the current app.