Method: projects.messages.send

Send a message to specified target (a registration token, topic or condition).

HTTP request

POST https://fcm.googleapis.com/v1/{parent=projects/*}/messages:send

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

Required. It contains the Firebase project id (i.e. the unique identifier for your Firebase project), in the format of projects/{project_id}. For legacy support, the numeric project number with no padding is also supported in the format of projects/{project_number}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "validate_only": boolean,
  "message": {
    object(Message)
  },
}
Fields
validate_only

boolean

Flag for testing the request without actually delivering the message.

message

object(Message)

Required. Message to send.

Response body

If successful, the response body contains an instance of Message.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/firebase.messaging
  • https://www.googleapis.com/auth/cloud-platform

For more information, see Authorize Send Requests.

Send feedback about...

Need help? Visit our support page.