收藏
回答

接口不接受参数

框架类型 问题类型 操作时间 AppID
小程序 Bug 2021-05-20 wxb1b9ba72147a3103

## 解决方法(2021-06-23更新)

不用guzzle用😅`php自带curl`就可以了

---

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/token/api_authorizer_token.html

请求代码guzzle,post params和query里都放了还是返回我参数少了component_appid,

$response = $client->request(
            'POST',
            sprintf(
                'https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token?component_access_token=%s&component_appid=%s&authorizer_appid=%s&authorizer_refresh_token=%s',
                $token,
                'wxb1b9ba72147a3103',
                "wxd4e41d3291f82a78",
                'refresh_token_value'
            ),
            [
                'form_params' => [
                    'component_access_token' => $token,
                    'component_appid' => 'wxb1b9ba72147a3103',
                    'authorizer_appid' => "wxd4e41d3291f82a78", 
                    "authorizer_refresh_token" => 'refresh_token_value',
                ],
                // note: 有的参数不放query里就传不过去...腾讯官方文档里没写
                'query' => [
                    'component_access_token' => $token,
                    'component_appid' => 'wxb1b9ba72147a3103',
                    'authorizer_appid' => "wxd4e41d3291f82a78", 
                    "authorizer_refresh_token" => 'refresh_token_value',
                ],
            ]
        );

返回报错

{"errcode":41018,"errmsg":"missing component_appid rid: 60a666d0-15b52b91-732227a6"}
最后一次编辑于  2021-06-23
回答关注问题邀请回答
收藏
登录 后发表内容