public static final String AUTHORIZER_FORUM_01 = "https://api.weixin.qq.com/cgi-bin/freepublish/batchget?access_token=";
/**
* 获取已发布图文信息列表
* 该接口所属的权限集 id 为:7
* @param map
* @param authorizerAccessToken
* @return
*/
public static JSONObject getAuthorizerForumList(Map<String,Object> map,String authorizerAccessToken) {
String url = AUTHORIZER_FORUM_01 + authorizerAccessToken;
JSONObject request = new JSONObject();
request.put("offset",Objects.isNull(map.get("offset")) ? 0 : map.get("offset"));
request.put("count", Objects.isNull(map.get("count")) ? 10 : map.get("count"));
request.put("no_content", Objects.isNull(map.get("noContent")) ? 1 :map.get("noContent"));
return JSONUtil.parseObj(HttpClientUtil.doPostJson(url,request.toString()));
}
调用post请求https://api.weixin.qq.com/cgi-bin/freepublish/batchget?access_token={authorizer_access_token}
请求体 {"offset":0,"count":10,"no_content":1}
响应体 {"errcode":48001,"errmsg":"api unauthorized hint: [cXweMa08277-13] rid: 687b6742-082202f6-0bce0444"}
授权回调保存的
存在权限集7,说明有权调用该接口,为什么会返回 48001?
这个报错和权限集无关哈,如果是权限集的问题,应该是报错61007。
48001是当前这个账号没有发布能力接口的调用权限。
自2025年7月起,个人主体账号、企业主体未认证账号及不支持认证的账号将被回收发布能力相关接口的调用权限。
可以参考文档说明:https://developers.weixin.qq.com/doc/subscription/guide/product/publish.html
可参考文档:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/troubleshooting/third_party_authority_instructions_troubleshooting.html