有没有解决,我也遇到同样的问题
公众号开发,服务器配置,报错:参数错误,请重新填写?公众号开发,服务器配置,报错:参数错误,请重新填写(如图一),但是调试工具中,URL配置验证是通过的(如图二) [图片] [图片]
2024-12-16服务端代码: @GetMapping("/wechat/receive") public ResponseEntity check(@RequestParam String signature, @RequestParam String echostr, @RequestParam String timestamp, @RequestParam String nonce) throws AesException { log.info("GET 收到通知, signature:{} echostr:{},timestamp:{},nonce:{} ", signature, echostr, timestamp, nonce); List<String> list = new ArrayList<>(); list.add(echostr); list.add(timestamp); list.add(nonce); wxUserService.checkReceive(signature, echostr, timestamp, nonce, ""); return ResponseEntity.ok(echostr); } @PostMapping("/wechat/receive") public ResponseEntity<String> receiveEvent(@RequestBody WxEncryptEvent wxEncryptEvent, @RequestParam String signature, @RequestParam String echostr, @RequestParam String timestamp, @RequestParam String nonce, @RequestParam String openid, @RequestParam String encrypt_type, @RequestParam String msg_signature) { log.info("收到通知body:{} echostr:{} timestamp:{} nonce:{} openid:{} encrypt_type:{} msg_signature:{}", wxEncryptEvent, echostr, timestamp, nonce, openid, encrypt_type, msg_signature); try { wxUserService.receiveEvent(wxEncryptEvent, echostr, timestamp, nonce, openid, encrypt_type, msg_signature); return ResponseEntity.ok(""); }catch (Exception e){ log.error("", e); } return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(""); } @Data public class WxEncryptEvent { String ToUserName; String Encrypt; }
公众号扫码事件推送如何设置?[图片] 不知错在哪里?还是我设置的位置不对? 以下是我对自己的URL验证结果 [图片]
2024-12-16