-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
文档:明确说明 wx-java-cp-multi-spring-boot-starter 中 corp-secret 的配置方式 #3957
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
base: develop
Are you sure you want to change the base?
Changes from all commits
31ee4c0
e9e263a
65da91f
8ffe585
aaa3e7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,29 @@ | |||||||||||||||||
| - 未实现 WxCpTpService 初始化,需要的小伙伴可以参考多 WxCpService 配置的实现。 | ||||||||||||||||||
| - 未实现 WxCpCgService 初始化,需要的小伙伴可以参考多 WxCpService 配置的实现。 | ||||||||||||||||||
|
|
||||||||||||||||||
| ## 关于 corp-secret 的说明 | ||||||||||||||||||
|
|
||||||||||||||||||
| 企业微信中不同功能模块对应不同的 `corp-secret`,每种 Secret 只对对应模块的接口具有调用权限: | ||||||||||||||||||
|
|
||||||||||||||||||
| | Secret 类型 | 获取位置 | 可调用的接口 | 是否需要 agent-id | | ||||||||||||||||||
| |---|---|---|---| | ||||||||||||||||||
| | 自建应用 Secret | 应用管理 → 自建应用 → 选择应用 → 查看 Secret | 该应用有权限的接口 | **必填** | | ||||||||||||||||||
| | 通讯录同步 Secret | 管理工具 → 通讯录同步 → 查看 Secret | 部门/成员增删改查等通讯录接口 | **不填** | | ||||||||||||||||||
| | 客户联系 Secret | 客户联系 → API → Secret | 客户联系相关接口 | 不填 | | ||||||||||||||||||
|
|
||||||||||||||||||
| > **常见问题**: | ||||||||||||||||||
| > - 使用自建应用 Secret + agent-id 可以获取部门列表,但**无法更新部门**(因为写接口需要通讯录同步权限) | ||||||||||||||||||
| > - 使用通讯录同步 Secret 可以同步部门,但**调用某些需要 agent-id 的应用接口会报错** | ||||||||||||||||||
|
|
||||||||||||||||||
| 如需同时使用多种权限范围,可在 `wx.cp.corps` 下配置多个条目,每个条目使用对应权限的 Secret,通过不同的 `tenantId` 区分后使用。 | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: medium Other Locations
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||||||||||||||||||
|
|
||||||||||||||||||
|
||||||||||||||||||
| > **配置限制说明**: | |
| > - 当前 starter/插件实现会校验:同一 `corp-id` 下,`agent-id` **必须唯一** | |
| > - 同一 `corp-id` 下,**只能有一个条目不填 `agent-id`** | |
| > - 否则会因为 token/ticket 缓存 key 冲突而在启动时直接抛异常 | |
| > | |
| > 因此,像“通讯录同步 Secret”“客户联系 Secret”这类通常不填写 `agent-id` 的配置,**不能**在同一个 `corp-id` 下同时配置多个都为空 `agent-id` 的条目;如确有多个条目,请确保其中最多只有一个未填写 `agent-id`` |
Uh oh!
There was an error while loading. Please reload this page.