如题,我提取用户信息转接的地址如下,设置的scope是userinfo
String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + this.appId
+ "&redirect_uri=" + URLEncoder.encode ("http://domain/subdomain")
+ "&response_type=code"
+ "&scope=snsapi_userinfo"
+ "&state=STATE&connect_redirect=1#wechat_redirect";
但成功调用用户信息接口时,返回的信息如下
{"openid":"********","nickname":"éƒä¸€å°˜@è€å¿ƒ","sex":0,"language":"","city":"","province":"","country":"","headimgurl":"https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/123456789071234567\/132","privilege":[]}
最后我调用接口
private String sendMessage = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s";
private String sendSubMessage = "https://api.weixin.qq.com/cgi-bin/message/subscribe/bizsend?access_token=%s";
发送模板消息和发送订阅消息接口时,返回的错误代码分别是
{"errcode":40003,"errmsg":"invalid openid rid: 617fce17-2214eb79-72b3d076"}
{"errcode":40003,"errmsg":"invalid openid rid: 617fce17-2e22bf18-2f41ff02"}
有没有大佬知道为什么?可能是第一步获取用户信息的时候纠错了,但我不知道错在哪里了。如果错了的话应该不能成功给我回复信息呀。
感谢大佬们救救我