收藏
回答

https://api.weixin.qq.com/cgi-bin/user/info报48001?

String grant_type = "client_credential";// 获取access_token填写client_credential
String AppId = weChatConfig.getOpenAppid();// 第三方用户唯一凭证
String secret = weChatConfig.getOpenAppsecret();// 第三方用户唯一凭证密钥,即appsecret

// 这个url链接地址和参数皆不能变
String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=" + grant_type + "&appid=" + AppId + "&secret="
        + secret;
try {
    Map<String, Object> accessTokenMap = HttpUtils.doGet(url);
    access_token = (String) accessTokenMap.get("access_token");
    System.out.println("getAccessToke------------------JSON字符串:" + accessTokenMap);
} catch (Exception e) {
    e.printStackTrace();
}

String subscribe = "0";
String url2 = "https://api.weixin.qq.com/cgi-bin/user/info?access_token="+access_token+"&openid="+openid+"&lang=zh_CN";
Map<String, Object> accessTokenMap2 = new HashMap<>();

access_token可正常返回,openid已通过页面获取到,接口返回48001 请问一下是具体是什么问题
{errcode=48001, errmsg=api unauthorized rid: 65b78642-30ed43b2-1479eb8f}


回答关注问题邀请回答
收藏
登录 后发表内容