Search code examples
androidandroid-studiohuawei-mobile-serviceshuawei-developershuawei-push-notification

Question on the HMS Push Kit : Restrictions of the maximum number of tokens cannot exceed 1,000?


I wonder if I can get more information on the sending downlink messages function under the HMS Push Kit.

Regarding the online documentation, there are two restrictions in this function.

I have a little bit question about the second restriction on “The maximum number of token cannot exceed 1000”.

The number of token means the target receiver token? What will be happen when I sent 1001 push messages in the same time?

If it will be failed, do I need to send second request to the HMS Push Server for sending the outstanding push messages?

If 1M push messages need to be sent in the same time. How can I achieve it? Do the HMS Push Kit allows me to do so?


Solution

  • If the maximum number of token exceed 1000 then we will get an errorcode as "80300010 : The number of tokens in the message body exceeds the default value" so the maximum number of token must not be more that 1000.

    If more tokens need to be used while send the messages, the best method is to inovoke the API using App server and send the messages in batches.Please find below screen for errorcode and its description :

    enter image description here

    The maximum number of messages that can be sent to an app on a device or user is 3,000 per day. Exceeding this number, messaging traffic to the app will be limited. When the number of messages exceeds 100,000, Push Kit will be disabled. In this case, rectification must be performed and a rectification plan must be submitted to apply for Push Kit again.

    Please go through the FAQ's for more information in below link : https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/faq-0000001050042183?ha_source=hms1