Krishna M
Krishna M

Reputation: 200

Huawei push API throws error saying token count is wrong in postman

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

Upvotes: 0

Views: 863

Answers (2)

Zinna
Zinna

Reputation: 2025

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.

Upvotes: 1

KirubaPradeep
KirubaPradeep

Reputation: 327

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

Upvotes: 1

Related Questions