当前位置:网站首页>WeChat applet getPhoneNumber interface code=40013
WeChat applet getPhoneNumber interface code=40013
2022-08-02 12:59:00 【· Code repair ·】
Record a problem encountered in the development process, obtain the user's mobile phone number through the getPhoneNum interface, and WeChat returns
code=40013, msg=invalid appid
Failed to get WeChat phone number, code=40013, msg=invalid appid
Invalid appid, then check the official interface documentation and find that we are not allowed to pass appid
phonenumber.getPhoneNumber | WeChat Open Documentation
But let's pass an interface call credential access_token, we need to pass the appId when we get this credential
auth.getAccessToken | WeChat Open Documentation
There is also a parameter code. This code is obtained by the applet through the wx.login interface. The WeChat applet has its own appid. If the appid we use to obtain the calling certificate is different from the appid used by the applet, it is better to obtain the mobile phone.will return 40013, invalid appId, the two appIds are the same.
边栏推荐
猜你喜欢
随机推荐
Drools(8): WorkBench uses
Object.entries()
package.json and package-lock.json
package.json与package-lock.json
瀑布流式布局怎么实现(什么是瀑布流布局)
linux basic command explanation
消除气泡解救蘑菇h5小游戏源码
FreeRTOS实验--一个函数创建多个任务
Openlayers Quick Start Tutorial
How to better assess credit risk?Just watch this scorecard model live
SQL Server2019安装步骤及脱机安装Microsoft机器学习组件下一步不能继续的问题
ESP8266模块使用完整教程「建议收藏」
RestTemplate 使用:设置请求头、请求体
Basic protocol explanation
WPF——自定义日历
Intelligent Image Analysis-Intelligent Home Appliance Image Target Detection Statistical Counting Detection and Recognition-iCREDIT
OpenFeign设置header的3种方式
【The 6th Strong Net Cup CTF-Wp】
selenium chrome driver运行时的cannot determine loading status from target frame detached问题
Speed up your programs with bitwise operations