0

I want send multiple notifications with one HTTP request to Firebase using REST API

Documentation says - "You should combine requests and send" https://firebase.google.com/docs/cloud-messaging/send-message#send-messages-to-multiple-devices

curl command for send is curl *** -H 'Content-Type: multipart/mixed; boundary="subrequest_boundary"' https://fcm.googleapis.com/batch

I found that https://fcm.googleapis.com/batch url is no longer supported https://developers.googleblog.com/2018/03/discontinuing-support-for-json-rpc-and.html

What right url for send multiple notifications to FCM?

Fesss
  • 25
  • 5

1 Answers1

0

There is a new API for sending messages through Firebase Cloud Messaging, called the versioned API. It lives on /v1/projects/<your-project-id>/messages:send and is fully documented in the Firebase documentation on sending requests.

In this new, versioned API sending multiple messages through the regular end point by sending a multi-part request to it. This process is fully documented in the section on sending a batch of messages and is also wrapped by most of the Admin SDKs that are available.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807