POST /v1/projects/{projectsId}/messages:send
Changed onSend a message to specified target (a Firebase Installation ID (FID), registration token, topic, or condition). If duplicate fields or parameters are provided in a request (such as repeated JSON keys in the request body or duplicate query parameters), the last occurrence takes precedence.
Request
- Base URLhttps://fcm.googleapis.com
- Auth
- OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/cloud-platformAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/cloud-platform
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/firebase.messagingAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/firebase.messaging
Path parameters
Query parameters
V1 error format.
OAuth access token.
Data format for response.
JSONP
Selector specifying which fields to include in a partial response.
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
OAuth 2.0 token for the current user.
Returns response with indentations and line breaks.
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
Legacy upload protocol for media (e.g. "media", "multipart").
Upload protocol for media (e.g. "raw", "multipart").
Request body
Request to send a message to specified target.
Message to send by Firebase Cloud Messaging Service.
Flag for testing the request without actually delivering the message.
Response
Successful response
Message to send by Firebase Cloud Messaging Service.
Android specific options for messages sent through FCM connection server.
Android specific V2 options for messages sent through FCM connection server. This is a v2 version of the AndroidConfig message and will replace it in the v2 API.
Apple Push Notification Service specific options.
Condition to send a message to, e.g. "'foo' in topics && 'bar' in topics".
Input only. Arbitrary key/value payload, which must be UTF-8 encoded. The key should not be a reserved word ("from", "message_type", or any word starting with "google." or "gcm.notification."). When sending payloads containing only data fields to iOS devices, only normal priority ("apns-priority": "5") is allowed in ApnsConfig.
Platform independent options for features provided by the FCM SDKs.
Firebase Installation ID (FID) to send a message to.
Output Only. The identifier of the message sent, in the format of projects/*/messages/{message_id}.
Basic notification template to use across all platforms.
Deprecated: Use fid instead. During the transition period, this field also accepts a Firebase Installation ID (FID). Registration token to send a message to.
Topic name to send a message to, e.g. "weather". Note: "/topics/" prefix should not be provided.
Webpush protocol options.
Changes
- info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/cloud-platformwas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/firebase.messagingwas removed from the endpoint's security schemeOauth2
1 more change in this revision
- info