当前位置:网站首页>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.
边栏推荐
猜你喜欢
随机推荐
麻烦问一下,对mysql 场景注入故障,是不是不是对mysql server 端注入故障,只是对ja
Object.entries()
The 7 most commonly used data analysis thinking, solve 95% of the analysis problems
软件成分分析:手握5大能力守护软件供应链安全
ETL(二):表达式组件的使用
FreeRTOS--优先级实验
OpenFeign设置header的3种方式
selenium chrome driver运行时的cannot determine loading status from target frame detached问题
消除气泡解救蘑菇h5小游戏源码
linux basic command explanation
路由-嵌套路由
PGSQL database to realize the import and export
pytorch模型转tensorflow模型
js半圆环加载进度动画js特效
【The 6th Strong Net Cup CTF-Wp】
PHP+MYSQL [Student Information Management System] (Minimalist Edition)
liunx基础命令讲解
GCC版本升级到指定版本
工厂方法模式
UAC绕过学习-总结