当前位置:网站首页>[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:18:00 【HMS Core】
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 ~
边栏推荐
- Solution of wrong index
- Vulnhub靶机:HACKER KID_ 1.0.1
- Fiddler set breakpoint (I)
- Rexroth proportional throttle valve 2wrce80d001-1x/pg24/m-120
- Immediate assertion and concurrent assertion in SystemVerilog
- 显式动力学子模型法在航空发动机整机瞬态冲击并行计算中的应用
- [opencv] record CV2 A hole in videocapture
- 数据中台、商业智能BI业务访谈(一):行业和业务研究的准备
- DS(ArrayStructure)
- 吃透Chisel语言.16.Chisel模块详解(三)——Chisel的整体连接(Bulk Connection),以流水线处理器为例
猜你喜欢
吃透Chisel语言.15.Chisel模块详解(二)——Chisel模块嵌套和ALU实现
Preparation Notes: opencv learning: color recognition
硅谷课堂第十二课-公众号点播课程和直播管理模块
Obtain epidemic information and data
首个X光下的小样本检测基准和弱特征增强网络,北航、讯飞新研究入选ACM MM 2022
[introduction series of redis] get to know redis and the installation of redis
视频拼接技术的发展
Deep learning (3): evaluation indicators of different classification models (F1, recall, P)
如何打造3D立体世界?跟随图片一同探寻
统计信息简介
随机推荐
What does DNS hijacking mean? What are the common hijackings?
Linux mysql(日志)占用大量磁盘空间问题原因及解决方法
Atos proportional overflow valve agmzo-ters-ps-010/315
Xcelium XRUN用户手册
SDN多控制器共识机制研究综述
Qu'est - ce que ça veut dire? Quels sont les détournements courants?
juc包下常用工具类
dns劫持是什么意思?常见的劫持有哪些?
[opencv] record CV2 A hole in videocapture
通达信炒股怎样线上开户?有没有安全上的问题??
How to create a 3D world? Explore with pictures
Data science and Computational Intelligence: connotation, paradigm and opportunity
柱塞泵ParKer PVP23363R26A121
Do you still have certificates to participate in the open source community?
PHP 匿名函数使用
力士乐比例节流阀2WRCE80D001-1X/PG24/M-120
万字长文,一文讲透!终于有人把商业智能(BI)讲清楚了
Preparation Notes: opencv learning: line detection
嵌入式软件架构划分
Phase mechanism in UVM