Scope 参数错误或没有 Scope 权限?
/**
* 生成场景二维码URL
*/
public String getQrCodeUrl(String scene, String redirectUrl) {
// 生成唯一的sceneStr
String sceneStr = generateSceneStr(scene);
// 存储初始状态
WechatLoginStatusDTO status = new WechatLoginStatusDTO();
status.setStatus(WechatLoginStatusDTO.STATUS_WAITING);
status.setSceneStr(sceneStr);
loginStatusMap.put(sceneStr, status);
// 构建微信授权URL(这里使用网站应用扫码登录方式)
String authUrl = "https://open.weixin.qq.com/connect/qrconnect" +
"?appid=" + appId +
"&redirect_uri=" + java.net.URLEncoder.encode(redirectUrl) +
"&response_type=code" +
"&scope=snsapi_login" +
"&state=" + sceneStr +
"#wechat_redirect";
return authUrl;
}
{ "msg": "操作成功", "code": 200, "data": [ { "sceneStr": "match_a", "qrCodeUrl": "https://open.weixin.qq.com/connect/qrconnect?appid=wxdb73333e7165b334&redirect_uri=http%3A%2F%2F127.0.0.1%3A8081%2Fapi%2Fuser%2Flogin%2Fwechat%2Fcallback&response_type=code&scope=snsapi_login&state=match_a_1761642257634_302_1761642257634_695#wechat_redirect", "sceneName": "比赛甲", "scene": "match_a" }, { "sceneStr": "match_b", "qrCodeUrl": "https://open.weixin.qq.com/connect/qrconnect?appid=wxdb73333e7165b334&redirect_uri=http%3A%2F%2F127.0.0.1%3A8081%2Fapi%2Fuser%2Flogin%2Fwechat%2Fcallback&response_type=code&scope=snsapi_login&state=match_b_1761642259952_90_1761642259952_736#wechat_redirect", "sceneName": "比赛乙", "scene": "match_b" } ] } 问题:scope参数错误或没有scope权限是什么意思