0

Using push API continuously returns token count should within 1 and 1,000. Please find the API error in the screenshot.

enter image description here

Anton Menshov
  • 2,266
  • 14
  • 34
  • 55
Krishna M
  • 180
  • 8

2 Answers2

1

The possible causes of this problem is, you have placed the “token” attribute in wrong place.

Solution: Please keep your “token” attribute within the “message” object,. enter image description here

For details, check the following documents:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-server-dev-0000001050040110

KirubaPradeep
  • 287
  • 1
  • 7
1

enter image description here

Your token is outside the message body, "token", "android" should be within the message body.

Please check the sample code here

Also, if you want to use more tokens (>1000), the best method is to invoke the API using App server and send messages in batches.

Zinna
  • 1,947
  • 2
  • 5
  • 20