2

Using the W3C Web Push API is it possible to send a push notification in batch so it is received by multiple users ? When subscribing a user agent for notification we obtain a unique endpoint such as:

endpoint":"https://fcm.googleapis.com/fcm/send/eAViP691.......

So if I want to send the same push to 1000 users, does it mean I need to make 1000 HTTP post requests to the push service ?

willogeard
  • 21
  • 2

1 Answers1

0

Yes, if you use the Push API directly, in order to reach N devices, you need to make N requests.

Otherwise you can use a web push service that does the work for you: that allows you to target thousands of user IDs with one API request or reach a segment using tags expressions.

collimarco
  • 34,231
  • 36
  • 108
  • 142
  • 1
    Thanks pushpad looks nice ! But as it supports the Web Push API under the hood it is probably making a request for each push. – willogeard Mar 21 '18 at 15:32
  • @WillOge Yes exactly: you make one API request to Pushpad, and then Pushpad, under the hood, makes one HTTP request for each device that must be reached – collimarco Mar 21 '18 at 20:02
  • Thanks @collimarco ! Going to have a look at Pushpad API. – willogeard Mar 22 '18 at 10:35