getPhoneNumber该接口用于将code换取用户手机号。 说明,每个code只能使用一次,code的有效期为5min。
http调用 POST: https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=ACCESS_TOKEN
云调用:
出入参和HTTPS调用相同,调用方式可查看云调用说明文档
接口方法为: openapi.phonenumber.getPhoneNumber
第三方调用:
调用方式以及出入参和HTTPS相同,仅是调用的token不同
该接口所属的权限集id为:18
服务商获得其中之一权限集授权后,可通过使用authorizer_access_token代商家进行调用
请求数据示例
{
"code": "e31968a7f94cc5ee25fafc2aef2773f0bb8c3937b22520eb8ee345274d00c144"
}
返回数据示例
{
"errcode":0,
"errmsg":"ok",
"phone_info": {
"phoneNumber":"xxxxxx",
"purePhoneNumber": "xxxxxx",
"countryCode": 86,
"watermark": {
"timestamp": 1637744274,
"appid": "xxxx"
}
}
}
详细介绍:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html
-
微信小程序打开任意公众号文章 wx.openOfficialAccountArticlewx.openOfficialAccountArticle是微信小程序通过小程序打开任意公众号文章api,不包括临时链接等异常状态下的公众号文章,必须有点击行为才能调用成功。
-
wx.onBatteryInfoChange 监听电池信息变化事件 APIwx.onBatteryInfoChange 为微信小程序监听电池信息变化事件 API,,目前只支持监听省电模式的切换,目前仅 iOS 端支持。
-
live-pusher 实时音视频录制媒体组件live-pusher 微信小程序实时音视频录制媒体组件,v2.9.1 起支持同层渲染。需要用户授权 scope.camera、scope.record。
-
open-container容器转场动画组件open-container为微信小程序容器转场动画组件。
-
wx.setStorage 将数据存储在本地缓存中指定的 key 中微信小程序wx.setStorage 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
-
微信小程序wx.getExtConfig 的同步版本 APIwx.getExtConfig 为微信小程序的同步版本 API。
暂无评论,抢个沙发...