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

admin.app.App

Optional app whose Messaging service to return. If not provided, the default Messaging service will be returned.

Value must not be null.

Returns

non-null admin.messaging.Messaging The default Messaging service if no app is provided or the Messaging service 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);

Interfaces