推送令牌无效

Push Token Invalidity

集成推送功能后,服务器界面returns向部分用户推送消息时报错码80300007。比如Mate 30客户端可以获得token。

服务器发送推送请求后,返回如下信息:

response is {"_code": "80300007", "_msg": "All the tokens are invalid", "_requestId": "159496694237460153003301"}

用户令牌在什么情况下会失效?这是因为服务器只有在调用推送请求时才知道这一点。客户端能否确定令牌无效? License过期后客户应该怎么办?

可以访问消息接收功能。如果根据收据发现无效令牌,则不会向令牌发送推送消息。

What does result code 80300007 mean?
Description : The specified token is invalid.

疑难解答

1.Different 同一设备上的应用程序需要使用不同的令牌。但是,可能会交付相同的令牌。

2.The设备上为应用配置的APK名称和应用ID与从AppGallery Connect应用的不同。

3.Check获取认证token的URL是否为https://login.cloud.huawei.com/oauth2/v2/token.

4.Check集成HMS Core Push SDK 3.0及以上版本时发送URL的消息是否为https://api.push.hicloud.com/pushsend.do when the HMS Core Push SDK 2.0 is integrated or whether it is https://push-api.cloud.huawei.com/v1/[appId]/messages:send

详情见:https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-receipt