当前位置:网站首页>[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes
[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes
2022-07-20 16:33:00 【Huawei mobile services】
HMS Core Push service Support developers to use HTTPS Access Agreement Push Server side , You can send downlink messages from the server to the terminal device . This article summarizes the most common messages sent by servers 6 An error code , It also provides cause analysis and solutions , Developers who encounter similar problems need to know about it .
Error code one :80200001," Oauth Authentication error "
Cause analysis :
- The message sent was not added Authorization The request parameter or value is empty .
- application A Of APPID Applied Access Token, But for applications B Push message , This error code will also appear .
apply Access Token
Send message
resolvent :
- Troubleshooting request HTTP Whether there is a reference in the head Authorization Request parameters .Authorization The acquisition method can Reference documents 、 Downlink message API can Reference documents .
- obtain Access Token The use of APPID And sending messages APPID Need to be consistent .
Error code two :80300007,"Token Invalid error "
Cause analysis :
token illegal ,token More or less characters , For example, there is more space in the following figure .
For application A Send message ,token But application B Of , This situation is also one of the reasons .
resolvent :
- Check token Is the parameter correct ;
- Make sure to send messages using token, It is obtained from the target application
Error code three :80300010," In message body Token The quantity does not meet the default value "
Cause analysis :
- Developers will “message” Misspelled fields , In the example diagram message There are too many fields at the end 'r';
- token Not in the right place , Field structure problem ;
- Issued token The quantity exceeds the limit , or token It's empty .
resolvent :
- Make sure message、token The field is written correctly ;
- message Field contains token, And "android" At the same level ;
- token The quantity of should be in 1-1000 individual , confirm token Number of parameters , Please refer to Reference documents .
Error code four :80200003,"Oauth Token Be overdue "
Cause analysis :
- Authorization In the request parameter value Access Token Has expired
The request parameter value is incorrect , More or less other characters .
resolvent :
- Access Token Valid for one hour , If the time limit is exceeded , You need to retrieve and use the latest Access Token Send message . Recapture Access Token Method Refer to article files
- Ensure that the Access Token Consistent with the obtained , Copy Access Token Escape characters appear when , Need to put “/” Revert to “/”.
Error code five :80100016," The message contains sensitive information "
Cause analysis :
This error message indicates that the content of the push message contains sensitive information
resolvent :
- Since no sensitive thesaurus is provided , Developers need to detect the content by themselves ;
- Developers can access twitter , After the message is approved by twitter , Huawei will not conduct a second audit . The process of accessing twitter can Reference documents .
matters needing attention :
- After approval of tibian , You need to add the results returned by tibian to Huawei Review Field result In the object , Only in this way can Huawei know that the message has passed the review , Huawei will not conduct a second audit .
"review": [
{
"reviewer": "tuibian",[]()
"type": 0,
"result": {
// The following is the result returned by tibian
"code": 200,
"data": {
"auditEngine": "t****ine",
"auditId": "0f74b*******0b3f490d",
"labels": []
},
"msg": "Pass",
"sign": "MEQCIBHc********IqLjw=="
}
}
]
}
- Not to put the whole message body on twitter “content” Field , What needs to be reviewed is “message” What's in it , At the same time, press ASCII The code is sorted in ascending order and then converted to string format for approval .
{
"validate_only":false,
"message":{
// The following parts need to be reviewed
"notification":{
"title":"message title",
"body":"message body"
},
"android":{
"collapse_key":0,
"notification":{
"click_action":{
"type":2,
"url":"https://example.com"
}
}
},
"token":[
"pushtoken1"
]
}
}
- Due to the cumbersome audit process , It is suggested to reduce the use of distribution fields , This operation is simpler and will avoid the occurrence of 80100018 Error code , This error code means that the message body sent to the third-party organization for review is inconsistent with the message body when it is issued .
Error code six :sub_error":57303,"error_description":"appid is overload blocked","error":1302
Cause analysis :
Too many requests access_token Flow controlled , The flow control threshold is 1000 individual /5 minute .
resolvent :
Adjust the request logic ,access_token Valid for one hour , No need to apply frequently . Flow control 5 Reset in minutes , You can apply again . more access_token Relevant restrictions can Reference documents .
Learn more >>
visit Official website of Huawei developer Alliance
obtain Development guidance document
Huawei mobile service open source warehouse address :GitHub、Gitee
Pay attention to our , The first time to understand HMS Core Latest technical information ~
边栏推荐
猜你喜欢
微信小程序实现选项卡的代码怎么写
吃透Chisel语言.19.Chisel组合电路(一)——Chisel组合电路与Chisel条件语句
网易云信音视频能力中台,全速助力银行业数字化转型升级
深入了解JUC并发(八)线程池
Interval merging [key problems + Solutions]
【一起学Rust】Rust包管理工具Cargo初步了解
CTFHub 技能树web
Leçon 13 de la salle de classe de la Silicon Valley - module de gestion en direct
Google asked Indian taggers to tag reddit comment data sets, with an error rate of up to 30%?
上半年广东出口增长7.3%,高新技术产品加快“出海”
随机推荐
谷歌请印度标注员给Reddit评论数据集打标签,错误率高达30%?
Vulnhub靶机:HACKER KID_ 1.0.1
#go 关于包的问题#
首个X光下的小样本检测基准和弱特征增强网络,北航、讯飞新研究入选ACM MM 2022
深入了解JUC并发(八)线程池
【机器学习】终于把机器学习建模的重要步骤讲清楚了
如何打造3D立体世界?跟随图片一同探寻
微信小程序如何实现下拉选项框
枚举系统内 中文字体
内网渗透之PTH&PTT&PTK(域控)
Immediate assertion and concurrent assertion in SystemVerilog
算法---翻转数位(Kotlin)
基于Emeditor的语料库统计与分析
2022-7-14 Jmeter模拟不同用户登录进行压测
Huggingface | technology behind bloom model training
Understand chisel language thoroughly 16. Detailed explanation of chisel module (III) -- bulk connection of chisel, taking pipeline processor as an example
怎么利用pixi.js制作简单的跑酷小游戏
Unity UGUI交互(新思路)
LabView---信号发生器
吃透Chisel语言.19.Chisel组合电路(一)——Chisel组合电路与Chisel条件语句