Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhanghuijun0 opened this issue Apr 24, 2025 · 0 comments

Comments

@zhanghuijun0
Copy link

简要描述

使用调用「获取会话内容存档开启成员列表」接口 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!/:?]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant