When requesting the WeChat Mini Program interface: obtaining unrestricted applet code, troubleshooting and analysis of some problems (Errcode: 41030, errmsg: Invalid Page Rid, Errcode: 47001, errmsg: data Format Error Rid, Unrecognized format)
1. When requesting the WeChat Mini Program interface: obtaining unrestricted applet code, an error is reported: errcode: 47001, errmsg: data format error Rid. as shown in Figure 1
Post https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={token}
content-type: application/x-www-form-urlencoded; charset=utf-8
scene=1825203750690640&page=pages%2findex%2findex
2. Adjust the content-type of the request parameter and solve it. Then another error is reported: errcode: 41030, errmsg: invalid page Rid. as shown in Figure 2
Post https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={token}
content-type: application/json; charset=utf-8
{"scene":"1825203750690640","page":"pages\/index\/index","width":null}
3. Adjust the “check_path”:false of the request parameter to solve it. Then report another error: unrecognized format. as shown in Figure 3
Post https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={token}
content-type: application/json; charset=utf-8
{"scene":"1825203750690640","page":"pages\/index\/index","width":null,"check_path":false}
4. Adjust the response format to raw-urlencoded, which can be solved
$response = $this->HttpClient->createRequest() ->SetMethod(post) ->seturl(WXA/GetWxAcodeUnlimit?access_token=. $accessToken) ->SetFormat(Client::Format_JSON) ->setData([ scene=> $scene, page=> $page, width=> $width, check_path=> false, env_version=>trial ]#atfp_close_translate_span#) ->send(); // Set the response format to raw-urlencoded (binary data) $response->format = client::format_raw_urlencoded;


