100 message limit on push notification API server?

Hi,
I was considering just using the Expo HTTP/2 push notification API endpoint for my push notifications instead of implementing the push notifications on my own server, just to save time. However I see the message: “The HTTP request body must be JSON. It may either be a single message object or an array of up to 100 messages.“

I was just looking for clarification on that 100 message limit. Does that mean if I have a topic with users subscribed to it, and I want to send them a notification when the topic updates, I can only send a push notification to 100 people? Can I create a loop and iterate through all of the people sending 100 at a time?

You can send multiple batch requests, each with up to 100 notifications. So if you wanted to send 420 notifications at once you could send five requests (100 + 100 + 100 + 100 + 20).

@ide
If in case any one push token in a batch of 100 is not registered or not recognised will the request break with error status?

I am trying to send notification to many users ( I have break them in to a group of 100 each) but still it is not working for me.

This is how my data looks like,

[{
  "to": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "title": "Test1",
  "body": "Hello world!"
}, {
  "to": "ExponentPushToken[yyyyyyyyyyyyyyyyyyyyyy]",
  "title": "Test1",
  "body": "Hello world!"
}]

the title and body is same for all only the to address will change.

In general, you will get back a receipt for each notification. Read the documentation on the notification API for the specific details: https://docs.expo.io/versions/latest/guides/push-notifications#response-format. The HTTP/2 response almost always explains the source of the error.

This topic was automatically closed after 14 days. New replies are no longer allowed.