当前位置:网站首页>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 appidInvalid 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.
边栏推荐
猜你喜欢
随机推荐
How to turn off hardware acceleration [easy to understand]
Do you really understand the business process service BPass?
SQL Server 数据库之导入导出数据
Js scratchable latex style draw plug-in
PGSQL database to realize the import and export
FreeRTOS--优先级实验
Openlayers Quick Start Tutorial
Taurus.MVC V3.0.3 Microservice Open Source Framework Released: Make the evolution of .NET architecture easier in large concurrency.
一款强大的js弹出alert插件
Distributed current limiting, hand & redisson implementation
麻烦问一下,对mysql 场景注入故障,是不是不是对mysql server 端注入故障,只是对ja
定了!2022世界VR产业大会将继续在南昌召开
SQL Server 2014 installation tutorial (nanny-level graphic tutorial)
FreeRTOS experiment--one function creates multiple tasks
RestTemplate 使用:设置请求头、请求体
GCC版本升级到指定版本
图论之Prim,最小生成树该怎么解?
图论之Floyd,多源图最短路如何暴力美学?
liunx基础命令讲解
qt 编译报错 No rule to make target








