微信不保存密钥,无法获取,只能重置
AppSecret(小程序密钥) 能否通过申诉找到?以前开发者跑路了,服务器快到期了,客户不知道登录方式,小程序源码没有,都是从新开发的,没有AppSecret(小程序密钥),重置的话会影响现在的小程序运行,有没有小程序的客服或者通过申诉或者工单来找回AppSecret(小程序密钥),急急急!!
10-29appid从哪来的
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权限是什么意思
10-28模板ID哪来的,服务号还是小程序的?
小程序发送订阅消息,为什么会非法模板id?https://api.weixin.qq.com/cgi-bin/message/subscribe/send [图片] { "errcode": 40037, "errmsg": "invalid template_id rid: 69009eaa-3f81c56d-792befca" }
10-28是不是违规了,把分享能力给封禁了
错误代码:43121,获取短链出错,这怎么处理?之前一直在使用,突然就不能用了 错误代码:43121,说明:can not generate short link for banning share ability rid: 69003ae1-1bfe6827-03d16ec7 appid:wx3477fddca048af0c /wxa/genwxashortlink
10-28认证过期了吧
此公众号并没有这些scope权限错误码10005?微信公众号APPIDwx7cee28bdb6125331,我们之前的功能是扫码做问卷,从上个月开始扫码会弹窗这个页面[图片],公司有多个公众号,请问wx7cee28bdb6125331的ID公众号是哪个
10-28一个是服务号的模板消息,另一个是小程序的订阅消息
接口的区别是什么?String url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + token; String url2 = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + token; z和两个接口什么区别?
10-27[图片]
请求自己的api服务器总是报连接被重置,域名加过了,还是访问不了,浏览器访问正常,什么原因?Request URL: https://www.deeplovedo.com/api/Resource/banner/1Referrer Policy: unsafe-urlRequest HeadersProvisional headers are shownReferer: https://servicewechat.com/wx6fa82e05074e2c2c/devtools/page-frame.htmlUser-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1 wechatdevtools/1.06.2504050 MicroMessenger/8.0.5 Language/zh_CN webview/1 desktopapp miniprogram port/42417 token/75535f9d309729077b23d5ef81972ef5 runtime/2 sessionid/1(failed)net::ERR_CONNECTION_RESET
10-25加上后缀试试呗
小程序临时文件上传,文件名称不带文件后缀上传肯定失败吗?api地址:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/kf-mgnt/kf-message/uploadTempMedia.html 小程序客服 /客服消息 /新增图片素材 图片链接地址,没有文件后缀:https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1667994205,255365672&fm=5d 代码: String token = this.getAccountAccessToken(account); String uploadMediaUrl = UPLOAD_MEDIA_URL + "?access_token=" + token + "&type=" + type; // 定义数据分隔符 String boundary = "------------zhiddatauploadfile"; try { // 根据内容类型判断文件扩展名 String suffix = mediaFileUrl.substring(mediaFileUrl.lastIndexOf(".")+1); String fileName = "file." + suffix; URL uploadUrl = new URL(uploadMediaUrl); SSLContext sc = SSLContext.getInstance("SSL"); sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); HttpsURLConnection uploadConn = (HttpsURLConnection) uploadUrl.openConnection(); uploadConn.setDoInput(true); uploadConn.setDoOutput(true); uploadConn.setSSLSocketFactory(sc.getSocketFactory()); uploadConn.setHostnameVerifier(new TrustAnyHostnameVerifier()); uploadConn.setRequestMethod("POST"); // 设置请求头Content-Type uploadConn.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary); // 获取媒体文件上传的输出流(往微信服务器写数据) OutputStream outputStream = uploadConn.getOutputStream(); BufferedInputStream bis = null; HttpsURLConnection httpsMediaConn = null; boolean error=false ; URL httpsMediaUrl = new URL(mediaFileUrl); httpsMediaConn = (HttpsURLConnection) httpsMediaUrl.openConnection(); SSLContext httpsSC = SSLContext.getInstance("SSL"); httpsSC.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); httpsMediaConn.setSSLSocketFactory(httpsSC.getSocketFactory()); httpsMediaConn.setHostnameVerifier(new TrustAnyHostnameVerifier()); httpsMediaConn.setRequestMethod("GET"); int httpRetCode = httpsMediaConn.getResponseCode(); // 如果有重定向 if (httpRetCode == 301 || httpRetCode == 302 || httpRetCode == 303) { String redictURL = httpsMediaConn.getHeaderField("Location"); URL redirectUrl = new URL(redictURL); SSLContext redirect = SSLContext.getInstance("SSL"); redirect.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); HttpsURLConnection redirectConn = (HttpsURLConnection) redirectUrl.openConnection(); redirectConn.setSSLSocketFactory(redirect.getSocketFactory()); redirectConn.setHostnameVerifier(new TrustAnyHostnameVerifier()); redirectConn.setRequestMethod("GET"); // 从请求头中获取内容类型 String contentType = redirectConn.getHeaderField("Content-Type"); // 请求体开始 outputStream.write(("--" + boundary + "\r\n").getBytes("utf-8")); outputStream.write(String.format("Content-Disposition: form-data; name=\"media\"; filename=\"%s\"\r\n", fileName).getBytes()); outputStream.write(String.format("Content-Type: %s\r\n\r\n", contentType).getBytes()); // 获取媒体文件的输入流(读取文件) bis = new BufferedInputStream(redirectConn.getInputStream()); byte[] buf = new byte[8096]; int size = 0; while ((size = bis.read(buf)) != -1) { // 将媒体文件写到输出流(往微信服务器写数据) outputStream.write(buf, 0, size); } // 请求体结束 outputStream.write(("\r\n--" + boundary + "--\r\n").getBytes()); outputStream.close(); bis.close(); // 获取媒体文件上传的输入流(从微信服务器读数据) InputStream inputStream = uploadConn.getInputStream(); InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8"); BufferedReader bufferedReader = new BufferedReader(inputStreamReader); StringBuffer buffer = new StringBuffer(); String str = null; while ((str = bufferedReader.readLine()) != null) { buffer.append(str); } bufferedReader.close(); inputStreamReader.close(); // 释放资源 inputStream.close(); inputStream = null; uploadConn.disconnect(); // 解析返回结果 JsonNode jsonNode = JsonUtil.getObjectMapper().readTree(buffer.toString()); // 测试打印结果 logger.info("[uploadFile] weixin return:" + jsonNode + "," + uploadMediaUrl);
10-24把问题反馈给京东客服,让他们联系开发人员排查
小程序无法发送验证码京东快递小程序登录时无法发送验证码,无法点击发送验证码按钮
10-24这是异步接口,还有新建一个接收回调通知的云函数
我上传的不规整图片云函数返回检测的竟然是正常的?这个微信的图片检测是不是有问题呀!云函数日志返回如下: 返回结果 {"code":0,"message":"检测完成","data":{"safe":true,"message":"图片检测已提交"}} 日志 START RequestId: 9daad9a4-a8fc-47b4-a253-b30ff1066e93 Event RequestId: 9daad9a4-a8fc-47b4-a253-b30ff1066e93 2025-10-22T12:55:40.760Z 收到检测请求: { fileID: 'cloud://cloud1-4gqldlz07dc1b01b.636c-cloud1-4gqldlz07dc1b01b-1378563200/profilephoto/avatar_1761137736123_grd2ba.jpeg', tcbContext: {}, userInfo: { appId: 'wxbe8c4a70eed15112', openId: 'o1CFO181hQEr6yUA-GzISJeH-d4E' } } 2025-10-22T12:55:40.965Z 获取临时URL成功: https://636c-cloud1-4gqldlz07dc1b01b-1378563200.tcb.qcloud.la/profilephoto/avatar_1761137736123_grd2ba.jpeg 2025-10-22T12:55:41.407Z 图片检测API返回: { traceId: '68f8d44d-2b0a0e6c-60ad0672', errMsg: 'openapi.security.mediaCheckAsync:ok', errCode: 0 } Response RequestId: 9daad9a4-a8fc-47b4-a253-b30ff1066e93 RetMsg: {"code":0,"message":"检测完成","data":{"safe":true,"message":"图片检测已提交"}} END RequestId: 9daad9a4-a8fc-47b4-a253-b30ff1066e93 Report RequestId: 9daad9a4-a8fc-47b4-a253-b30ff1066e93 Duration: 653ms Memory: 256MB MemUsage: 22.843750MB
10-22