微信验证请求

This commit is contained in:
2025-10-20 15:46:50 +08:00
parent b6f1709219
commit 9fa8d50073
2 changed files with 30 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ public class AcAccountUtil {
bodyJson.put("action_name", "QR_SCENE");
JSONObject actionInfo = new JSONObject();
JSONObject scene = new JSONObject();
scene.put("scene_id", 3);
scene.put("scene_id", 36449);
actionInfo.put("scene", scene);
bodyJson.put("action_info", actionInfo);
System.out.println(bodyJson);
@@ -118,5 +118,7 @@ public class AcAccountUtil {
String resps = HttpUtil.post(StrUtil.format("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={}", accessToken), JSONObject.toJSONString(bodyJson));
JSONObject respInfos = JSONObject.parseObject(resps);
System.out.println(respInfos);
//{"action_info":{"scene":{"scene_id":36434}},"action_name":"QR_SCENE","expire_seconds":"2592000"}, 响应内容: {"errcode":40052,"errmsg":"invalid action name rid: 68f5e3ac-7f703951-6a8908fa"}
//{"action_info":{"scene":{"scene_id":36449}},"action_name":"QR_SCENE","expire_seconds":"2592000"}
}
}