firebase Push notification from custom server Firebase Cloud Messaging HTTP Protocol


From your server request to the the link below to send the notification with some request parameters

While requesting add headers as follows

Authorization    key=<Your_key_from_the_console>
Content-Type     application/json

The body of the request varies

  "to" : <tokens or the topic>,
  "notification" : {
    "title":"This is a test title",
    "body":"This is the body"
  "data": {
      //whatever key value payer you need to send  

The to parameters takes Array of tokens like


or a single token like


or a topic name starting with /topic/ like


For multiple topic use conditions using || and && operators like

"/topic_name/ && /topic2/"