norkunas / onesignal-php-api

OneSignal API for PHP
MIT License
234 stars 83 forks source link

How to achieve sending notification to more than 2000 people? #93

Closed Slavezax closed 5 years ago

Slavezax commented 6 years ago

Do you have an idea to implement this feature?

norkunas commented 6 years ago

Hi,

So far I didn't have a chance to send so many notifications yet :) Do you mean this is limited by OneSignal itself or something is broken in the library?

Slavezax commented 6 years ago

Yes. You can see it https://documentation.onesignal.com/reference#create-notification

include_player_ids

array_string

RECOMMENDED - Specific players to send your notification to. Does not require API Auth Key.

Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: ["1dd608f2-c6a1-11e3-851d-000c2940e62c"]

Limit of 2,000 entries per REST API call

norkunas commented 6 years ago

The way I see then is to create separate notifications because it's not library responsibility to workaround those limits :)

peter279k commented 6 years ago

I think it looks like a limitation of the original API service provider.

It's out of range for this PHP package. Perhaps sending the notifications are for two times to the 4000 people.