binarywang / weixin-java-miniapp-demo

基于Spring Boot 和 WxJava 实现的微信小程序Java后端Demo
1.34k stars 678 forks source link

setUserStorage 上报问题 #65

Open Leiante opened 1 year ago

Leiante commented 1 year ago

为什么我这边用setUserStorage上报不了?

     ...省略代码

    @Resource
    private WxMaService wxMaService;

    ...省略代码

           Map<String, String> map = new HashMap<>(1);
           map.put("RankData", Convert.toStr(event.getValue()));
           wxMaService.getUserService().setUserStorage(map, member.getSessionKey(), member.getOpenId());

    ...省略代码

我的 member.getSessionKey() 和 member.getOpenId() 是我微信登录成功之后,保存库里,然后调取出来再带入参数的

【请求地址】: https://api.weixin.qq.com/wxa/set_user_storage?appid=wx070b7ae0018xxxx&signature=3517A1FF0E74DE3DAxxxxA5A248610F419BEA57807989400F2C3C3378E4&openid=od8eU5AAd0kjmUpiUQMSM82onWTg&sig_method=hmac_sha256&access_token=70_gvBwRwPDXha6ldKD0V5Z5PbzR4Re1IP6SpZLZ7jHwYt4FCHel9iItwJL7sS3sklcGUyiRA82YC9Dsdut-Z_DjyDk8wk5KI5E9hbJGIQ17uuCjn6rnSh0WgtdKqAEZHeAJAIDL
【请求参数】:{"kv_list":[{"key":"RankData","value":"50"}]}
【错误信息】:错误代码:87009, 错误信息:invalid signature rid: 64a04529-3a24d76e-76d3a315,微信原始报文:{"errcode":87009,"errmsg":"invalid signature rid: 64a04529-3a24d76e-76d3a315"}
binarywang commented 1 year ago

非法签名?