Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用推送 API 连续返回令牌计数应在 1 和 1,000 之间。请在屏幕截图中找到 API 错误。
此问题的可能原因是,您将“token”属性放置在错误的位置。
解决方案:请将您的“token”属性保留在“message”对象中。 在此处输入图像描述
有关详细信息,请查看以下文档:
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-server-dev-0000001050040110
您的令牌在消息正文之外,“token”、“android”应该在消息正文中。
请在此处查看示例代码
另外,如果你想使用更多的令牌(>1000),最好的方法是使用应用服务器调用API并批量发送消息。