WxJava icon indicating copy to clipboard operation
WxJava copied to clipboard

获取会话内容存档开启成员列表,提示“API接口无权限调用”

Open zhanghuijun0 opened this issue 7 months ago • 1 comments

简要描述

使用调用「获取会话内容存档开启成员列表」接口 get_permit_user_list

me.chanjar.weixin.cp.api.WxCpMsgAuditService#getPermitUserList

https://qyapi.weixin.qq.com/cgi-bin/msgaudit/get_permit_user_list?access_token=ACCESS_TOKEN

模块版本情况

  • WxJava 模块名: weixin-java-cp
  • WxJava 版本号: 4.7.0

详细描述

调用接口get_permit_user_list ,应该使用“会话内容存档”页面的secret生成的accessToken,而不是应用的secret,accessToken获得页面为:https://work.weixin.qq.com/wework_admin/frame#/financial/corpEncryptData

日志

Caused by: me.chanjar.weixin.common.error.WxErrorException: 错误代码:48002, 错误信息:API接口无权限调用,微信原始报文:{"errcode":48002,"errmsg":"api forbidden, hint: [1745481144594130532181532], from ip: 47.98.*.*, more info at https://open.work.weixin.qq.com/devtool/query?e=48002","ids":[]}
	at me.chanjar.weixin.common.util.http.SimplePostRequestExecutor.handleResponse(SimplePostRequestExecutor.java:57) ~[weixin-java-common-4.7.0.jar!/:?]
	at me.chanjar.weixin.common.util.http.apache.ApacheSimplePostRequestExecutor.execute(ApacheSimplePostRequestExecutor.java:44) ~[weixin-java-common-4.7.0.jar!/:?]
	at me.chanjar.weixin.common.util.http.apache.ApacheSimplePostRequestExecutor.execute(ApacheSimplePostRequestExecutor.java:23) ~[weixin-java-common-4.7.0.jar!/:?]
	at me.chanjar.weixin.cp.api.impl.BaseWxCpServiceImpl.executeInternal(BaseWxCpServiceImpl.java:364) ~[weixin-java-cp-4.7.0.jar!/:?]

zhanghuijun0 avatar Apr 24 '25 07:04 zhanghuijun0