- 公众号网页授权获取到其他人的 unionId?
场景:新用户使用 snsapi_userinfo 拉起网页授权,拿到 code 之后通过后台获取 unionId,然后注册用户 问题:上面获取到的 unionId 是我们系统的另一个旧用户,导致新用户登录上了旧用户的账号。另外获取的用户信息中昵称是“微信用户”,如果是快照页模式为什么是获取到一个真实用户的 unionId? 参考文档: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html#3 使用 appId: wx3ae396a0c53d5239 发生时间: 2023-12-04 18:29:11 用户授权拿到的 code: 051NWZ0w3W5DP13TNh0w3LJxaW3NWZ0e 通过 code 换取 accessToken 日志: {"accessToken":"75__XzdC5_xbOaF-KME8vzqR_8u4WVG4zzFTcnBmhVt-ksm7AK1VG_BsApSHV4U0K11ODUgOiMmm6HJnapivlEUOZhkCzM6GNcMJ********","expiresIn":7200,"openid":"o6o21wAqe1bxm-yf0e3WIldI9z2g","refreshToken":"75_g8vUJ-qSCGrXyCcqqLnS8I4snW_IiZI7khqfwPjchWoNo0OgFJv23tap8-4x244hjZUaizn03SbwX_nzEaUrX-TyF3LP-88zX4jh*******","scope":"snsapi_userinfo"} 拉取用户信息日志: {"openid":"o6o21wAqe1bxm-yf0e3WIldI9z2g","nickname":"微信用户","sex":0,"language":"","city":"","province":"","country":"","headimgurl":"https://thirdwx.qlogo.cn/mmopen/vi_32/Q3auHgzwzM4tkpGVCbufIKWSvnG3ZUWjOfKGcH2OeEVhYn1ltbicREUXHsZa4UDhstDps6KtpvdmTjuVm3RqKuQ/132","privilege":[],"unionid":"o8Yuys2RbDFijvQY-GVkBB5HNlu0"} 新用户实际 unionId: o8YuysznpmRS8aCqTCN0LMciofXU,跟旧用户 o8Yuys2RbDFijvQY-GVkBB5HNlu0 不一样 补充: 新用户实际 openId 无法提供,因为两个用户是通过不同公众号授权,我们系统是根据 unionId 唯一标识用户
2023-12-08 - 视频号小店回调消息官方sdk解密失败?
Java 版本:1.8.0_172 官方 sdk 下载地址:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Before_Develop/Message_encryption_and_decryption.html,通过示例代码-点击下载 问题:收到视频号小店回调消息,解密时出现堆溢出 原因:在方法 com.qq.weixin.mp.aes.WXBizMsgCrypt#decrypt 解密时,计算 xmlLength 错误,取值过大,导致 Arrays.copyOfRange 时创建 byte[] 过大,最后堆溢出 截图: [图片] 在解密之前我们是已经验证 signature 了,所以请求应该是对的,下面是测试用的 main 方法,AppID:wx946a0126faf05117 public static void main(String[] args) throws AesException { String token = "7tyam"; String aesKey = "chwjjgre8aoqs85shbjxwn3q7eucsdprwgev6wx8an9"; String msgSignature = "f7a3294c2d63c71fba4903dbaf59bcc299e93000"; String timestamp = "1683744260"; String nonce = "2039739693"; String encrypt = "/CwHNJaI7TWZjv6HrvBN3OMWPck2Wmv+KimPFi2Z2PHpDd/T7p5Almay/bqRm/PgOTTHuKBSZbuqwkELV/u8PG30poUraIfu+Owok6lw2BA72pQ7maLPt6QmbZASlCpZRetGbNefupH+x01wzB5HIqcyhYUXKJyo771+TQsHpm+zEbadD+s3gMtiU6OxYBdnLp/HA1p/opUqnxXPs62JRIxUQpVKSBYsvLpUPwGiY9XoOXz1n1Pzeh6SkA+EpNafTyBmi51/CB0+mDjfcTTmZOdBfkRyRor13JTmgMz3S+T5D9hY/Ob0ntq1LR+Er66z/X7oAqXgbBonBmjHvOeMuJtDyWkSRfVkIcnxZwdoH93nZEQNIv00l+PZxJh6Uq+N"; WXBizMsgCrypt pc = new WXBizMsgCrypt(token, aesKey, null); String decryptMsg = pc.VerifyURL(msgSignature, timestamp, nonce, encrypt); log.info("微信视频号小店回调入参,decryptMsg={}", decryptMsg); }
2023-05-11 - 小程序卡片消息没有回调?
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/receive.html
2022-12-28 - 小程序卡片消息没有收到回调?
appid:wx984d6990d313afd4 在小程序客服会话发送卡片没有收到对应的回调消息,而发送文字消息就有回调通知,比如下面: ts=2022-12-27 19:22:33; [cost=318.923884ms] result=@ArrayList[ @Object[][ @HashMap[ @String[Content]:@String[我给你], @String[CreateTime]:@String[1672140153], @String[ToUserName]:@String[gh_2b78d1bc04d8], @String[FromUserName]:@String[oFTrq0BXnjHEXaoJEA6URyYoNIt0], @String[MsgType]:@String[text], @String[MsgId]:@String[23939290425510792], @String[Encrypt]:@String[cKs5jHwFovBArjFjd+EE93+/620LfbXnOqigKpZ+3Y2JWTbTnrUqy6S3ZL/2Rvn8HUJ492n5+c00ZOtZsk6H5lPH9URE5pxf6RnkFNMkBH6uYmkBR2OC/bI4mqt1E9HT5vUamFdB7RcmCULXWLltBdTCVSYZ6jWgZdckCHJUn9hRuMh1ZBIpJMCN5VgZPlCCt1JMTOE33zBzPNwG9sYuIm6M2gusnS7GAlMEgwljYfCoPvXP8+KwBxjzY+C2yKxtURh+j8KOXHahk46HbnFIe6gAfgyI0SPXDdO7RzHmXOh0kRf4F4lIQDxPcBzASRhaYb/9CuqchDhD9d8TgOSA76QleUWRTcKrWD/MrSY9XbxEEk0j1NICSovCKCd4iMghig0z4SQXEwI9AdmK7zGH1ikEYRyzvkMN8DhRLRkrr2s=], ], ] [图片]
2022-12-27 - 添加公共模板失败
调用接口:https://api.weixin.qq.com/cgi-bin/template/api_add_template?access_token=ACCESS_TOKEN appId:wx8d7f1aa5abbcec6d template_id_short:OPENTM400833477 返回:{"errcode":43106,"errmsg":"not allow to add template, for punishment rid: 61f3835b-62d28a65-1bd10ea8"}
2022-01-28 - 用户在我们平台提现返回 RECEIVED_MONEY_LIMIT ?
我们这边有笔提现订单,一直返回 RECEIVED_MONEY_LIMIT 错误码,因此每天都会用同样订单号重复发起付款请求。但是用户表示这几天没有再提现了,为什么会说【已达到今日付款给此用户额度上限】,订单号是 2000013816886886
2021-09-07 - 2021-06-01凌晨00:30左右获取授权登陆用户信息为空?
在2021-06-01凌晨00:30左右,我们系统发现获取授权登陆的用户信息返回为空,调用的接口是:https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPEN_ID&lang=zh_CN 下面是日志打印: [2021-06-01 00:31:29.030] DEBUG - 获取获取授权调用凭证start------------------>>>>>>>>>>> [2021-06-01 00:31:29.305] DEBUG - 获取获取授权调用凭证end------------------>>>>>>>>>>>{"access_token":"45_6QLrDjOQ2GLgTK5 ZpNyd42BfahiFyQXYY40T5URRIy_l5X8rcn0_LSCaDMUDOaiYIylEV1dHEXhBQELjSdSlvSpPutkFBPcJIvacBdkXGJo","expires_in":7200,"refresh_token":"45_QIQGh4kOkcEM2ILgfQfzFC_n0yHwzTGlonW4UiI_K8HT613gJEpHV2kQfoTgnIne5agyYE 5dLjq5xwzHTVl8PRDOgMHQ4Xmjp2grDWZxhCg","openid":"o09Gyt-PoLACar-zImsL50c7O6Lc","scope":"snsapi_userinfo","unionid":"o8Yuys_YbjgDI5AjOCbB9tEmQpCQ"} [2021-06-01 00:31:29.318] DEBUG - wechatAuth,code = 021e3d000sqXNL1Eim20072AXy2e3d0b,htmlAccessToken = {"accessToken":"45_ 6QLrDjOQ2GLgTK5ZpNyd42BfahiFyQXYY40T5URRIy_l5X8rcn0_LSCaDMUDOaiYIylEV1dHEXhBQELjSdSlvSpPutkFBPcJIvacBdkXGJo","expiresIn":7200,"openid":"o09Gyt-PoLACar-zImsL50c7O6Lc","refreshToken":"45_QIQGh4kOkcEM2ILgf QfzFC_n0yHwzTGlonW4UiI_K8HT613gJEpHV2kQfoTgnIne5agyYE5dLjq5xwzHTVl8PRDOgMHQ4Xmj******","scope":"snsapi_userinfo"} [2021-06-01 00:31:29.319] DEBUG - 获取用户基本信息start------------------>>>>>>>>>>> [2021-06-01 00:31:29.396] DEBUG - 获取用户基本信息end------------------>>>>>>>>>>>{"openid":"o09Gyt-PoLACar-zImsL50c7O6Lc","nick name":"","sex":0,"language":"","city":"","province":"","country":"","headimgurl":"","privilege":[],"unionid":""}
2021-06-01 - 不小心删除群发消息的图文,导致图文详情页失效,可以恢复吗?
不小心删除群发消息的图文,导致图文详情页失效,可以恢复吗?急!!!
2021-01-20 - 小程序订阅消息发送的文档有误
https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.send.html 文档说的模板 id 有误,原来说的例子是:每个模板参数都会以类型为前缀,例如第一个数字模板参数为 number01.DATA,第二个为 number02.DATA。 然而实际并不是这样,经过测试,模板参数应该是“关键词类型+关键词 kid” 这样组合才对,希望能修改过来。
2020-05-22