2

We are trying to sending promotional push messages to 8k different devices. We are getting success in response to the push notification URL https://fcm.googleapis.com/fcm/send

But only some of the users are getting this notification and not all. So is there any limitation in Firebase Cloud Messaging to send bulk push as i tried to find on Firebase documentation, but it is not written anywhere.

I tried to get the exact limit suggested by Google, but could not locate to a specific page where in Google has mentioned the limit.

However I have found one link of quora send more than 1000 push messages

AL.
  • 36,815
  • 10
  • 142
  • 281
Hunt
  • 8,215
  • 28
  • 116
  • 256

3 Answers3

3

According to this answer, the FCM limitations are similar to GCM.

From the GCM documentation:

...It must contain at least 1 and at most 1000 registration tokens.

So you're presumably able to send each message to 1000 devices. Since you're not limited in number of messages, you can send the same message 8 times, to 8 different lists.

Community
  • 1
  • 1
Neria Nachum
  • 1,519
  • 1
  • 20
  • 37
  • I have more than 10,000 registration tokens how can I send a same message to each and every unique device. please help – Neotrixs Jan 25 '18 at 11:52
  • @Neotrixs Group your tokens into lists of 1000 tokens each, and send a new message to each list. – Neria Nachum Jan 25 '18 at 12:21
  • @NeriaNachum.. Can you guide me on how to implement this..? – Akhil Mathew Feb 21 '19 at 11:33
  • @AKHILMATHEW Specific implementation is depending on your server-side language & framework, but the core solution is the same: Instead of sending a single message to all recipients, split them into lists of 1000 (at most) and send the same message to each list. – Neria Nachum Feb 21 '19 at 15:17
  • @NeriaNachum. I am using python to sent the push notification. I have one more doubt. Google itself provides the grouping of tokens option known as device groups. Is there a way to send bulk push to group tokens/IDs rather than to multiple regs. tokens. – Akhil Mathew Feb 22 '19 at 10:11
2

@NeriaNachum's answer is referring to sending messages to multiple recipients limit when using the registration_ids parameter. From the FCM docs (which I think is what you were looking for):

This parameter specifies the recipient of a multicast message, a message sent to more than one registration token.

The value should be an array of registration tokens to which to send the multicast message. The array must contain at least 1 and at most 1000 registration tokens. To send a message to a single device, use the to parameter.

Multicast messages are only allowed using the HTTP JSON format.

However, if you use Topics Messaging instead, there is no limit. Just make sure that each of the user you intend to send a message to is properly subscribed. If you have your own App Server, you can subscribe multiple tokens using the Instance ID API (see my answer here).

Community
  • 1
  • 1
AL.
  • 36,815
  • 10
  • 142
  • 281
1

You can only send it to 500 users in one go. Better implement batching at your end.

https://firebase.google.com/docs/reference/admin/java/reference/com/google/firebase/messaging/MulticastMessage

maheshsgr
  • 2,422
  • 1
  • 14
  • 11
  • What about device to device sending,where a device uses the server key to send to another device. Yeah,I know this is highly discouraged,just wondering what limitations exists here? – HasIEluS Jan 04 '23 at 20:34