admin. messaging
messaging
messaging(app) returns admin.messaging.Messaging
Gets the Messaging service for the default app or a given app.
admin.messaging() can be called with no arguments to access the default app's Messaging service or as
admin.messaging(app) to access the
Messaging service associated with a specific app.
Parameter |
|
|---|---|
|
app |
Optional Optional app whose Value must not be null. |
- Returns
-
non-null admin.messaging.MessagingThe defaultMessagingservice if no app is provided or theMessagingservice associated with the provided app.
Examples
// Get the Messaging service for the default app
var defaultMessaging = admin.messaging();
// Get the Messaging service for a given app
var otherMessaging = admin.messaging(otherApp);

