mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-09-24 16:39:52 +08:00
feat(dingtalk): implement one-click QR registration and polling mechanism (#8198)
This commit is contained in:
@@ -16,6 +16,20 @@ Proactive message push: Supported.
|
||||
|
||||
## Create and Configure the App
|
||||
|
||||
DingTalk supports two setup methods: one-click QR creation in AstrBot, or manually creating an app in DingTalk Open Platform.
|
||||
|
||||
### Option 1: One-click QR Creation
|
||||
|
||||
AstrBot version requirement: >= v4.25.0.
|
||||
|
||||
Open AstrBot Dashboard -> `Bots` -> `+ Create Bot`, then select `DingTalk`.
|
||||
|
||||
Under `Creation Method`, select `One-click QR setup`, scan the QR code with the DingTalk mobile app, then create or bind a bot on the DingTalk authorization page. After creation succeeds, AstrBot automatically fills in `ClientID` and `ClientSecret`. Click `Save` to finish.
|
||||
|
||||
After QR creation succeeds, continue checking the event subscription, version release, and group installation steps below.
|
||||
|
||||
### Option 2: Manual Creation
|
||||
|
||||
Go to the [DingTalk Open Platform](https://open-dev.dingtalk.com/fe/app), then create an app:
|
||||
|
||||

|
||||
@@ -36,7 +50,7 @@ Go to Credentials & Basic Information, then copy `ClientID` and `ClientSecret`.
|
||||
|
||||
Open AstrBot Dashboard -> `Bots` -> `+ Create Bot`, then create a DingTalk adapter.
|
||||
|
||||
Fill in `ClientID` and `ClientSecret`, then click Save. AstrBot will request authorization from DingTalk Open Platform automatically.
|
||||
If you want AstrBot to create the app for you, select `One-click QR setup` and complete the scan. If you already created the app yourself, select `Manual setup`, fill in `ClientID` and `ClientSecret`, then click Save. AstrBot will request authorization from DingTalk Open Platform automatically.
|
||||
|
||||
Back in DingTalk Open Platform, open Event Subscriptions, select `Stream mode push`, and click Save. If successful, you will see a connected status.
|
||||
|
||||
|
||||
@@ -16,6 +16,20 @@
|
||||
|
||||
## 创建和配置应用
|
||||
|
||||
钉钉支持两种创建方式:在 AstrBot 中扫码一键创建,或在钉钉开放平台手动创建应用。
|
||||
|
||||
### 方式一:扫码一键创建
|
||||
|
||||
需要 AstrBot 版本 >= v4.25.0。
|
||||
|
||||
打开 AstrBot 管理面板 -> `机器人` -> `+ 创建机器人`,选择 `钉钉(DingTalk)`。
|
||||
|
||||
在 `选择创建方式` 中选择 `扫码一键创建`,使用手机钉钉扫描页面中的二维码,并在钉钉页面中创建或绑定机器人。创建成功后,AstrBot 会自动写入 `ClientID` 和 `ClientSecret`,此时点击 `保存` 即可。
|
||||
|
||||
扫码创建完成后,仍建议检查后文的事件订阅、版本发布和拉入群组步骤。
|
||||
|
||||
### 方式二:手动创建
|
||||
|
||||
前往 [钉钉开放平台](https://open-dev.dingtalk.com/fe/app),点击创建应用:
|
||||
|
||||

|
||||
@@ -36,7 +50,7 @@
|
||||
|
||||
打开 AstrBot 管理面板 -> `机器人` -> `+ 创建机器人`,创建一个钉钉适配器。
|
||||
|
||||
将刚刚复制的 `ClientID` 和 `ClientSecret` 填入,点击保存,AstrBot 将会自动向钉钉开放平台请求。
|
||||
如果使用扫码一键创建,选择 `扫码一键创建` 并完成扫码;如果使用自己创建的钉钉应用,选择 `手动创建`,将刚刚复制的 `ClientID` 和 `ClientSecret` 填入。点击保存后,AstrBot 将会自动向钉钉开放平台请求。
|
||||
|
||||
回到钉钉开放平台,点击事件订阅,选择 `Stream 模式推送`,点击保存,如果没有意外情况,将会看到 连接接入成功 字样。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user