AI助手支持GPT4.0
在后台调用getuserphonenumber接口一直报错,是不能在后台用吗?Calling the getuserphonenumber interface in the background keeps reporting an error. Can it be used in the background?
在后台调用getuserphonenumber接口一直报错,是不能在后台用吗?
小程序需要获取手机号,通过界面按钮获取code值后,提交给后台获取手机号:
1、通过接口:https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=""&secret=""获取到access_token值后调用接口:
2、https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token='+access_token+"&code="+phoneCode,调用后提示:
data format error hint: [Wgdbr7Ore-oEm.7] rid: 62259c4a-7c28684e-6eb764dc
The applet needs to obtain the mobile phone number. After obtaining the code value through the interface button, submit it to the background to obtain the mobile phone number: 1. Through the interface: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid= "" & Secret = "" get access "_ Token value after calling interface: 2, https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token= '+access_ Token + "& code =" + phonecode, prompt after calling: data format error hint: [wgdbr7ore OEM. 7] rid: 62259c4a-7c28684e-6eb764dc
需要通过用户触发button按钮返回的code才可以。