> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 机器人接收消息

# 指令输入

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-01.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=59e11dab3eb97c22559d5df8d4aca74a" alt="image" width="592" height="324" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-01.png" />

app\_key：获取方式如下

app\_secret: 获取方式如下

文件存储路径：用来存放输出消息文件的路径。

企业内部应用获取 AppKey 和 AppSecret，开通机器人

打开网址[https://open-dev.dingtalk.com/fe/app](https://open-dev.dingtalk.com/fe/app) 登录钉钉开发者后台

1.创建企业内部应用

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-02.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=24727eb1ec5421d1cea1df8665eae4db" alt="image" width="500" height="678" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-02.png" />

2.填写创建应用相关信息：

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-03.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=5be7670e0be2128ea9cdcce70337eb95" alt="image" width="620" height="1250" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-03.png" />

3.添加机器人

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-04.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=d6978a5dccac5a7eb784527d64f449df" alt="image" width="2158" height="919" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-04.png" />

4.机器人配置并发布机器人

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-05.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=059dc98e0b10d019f8b14e229d523b71" alt="image" width="923" height="1129" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-05.png" />

5.需开通一下权限: 成员信息读权限，调用企业API基础权限，企业内机器人发送消息权限，3个权限都需要开通

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-06.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=a0dfe7206b1e17c8dca86dfdf785ec68" alt="image" width="2430" height="851" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-06.png" />

6.应用发布：

点击查看版本详情

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-07.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=b00fd02787e4aeb692b69ff417c401f1" alt="image" width="2419" height="799" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-07.png" />

点击编辑标志，把版本信息补充完整

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-08.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=67cf89ed2bf4403ba79019d865b5f946" alt="image" width="1109" height="564" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-08.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-09.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=a7100d91c2c96acb285c62698c76e561" alt="image" width="1229" height="1035" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-09.png" />

### 获取 AppKey 和 AppSecret

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-10.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=1031c5a053d4a12c8d2f5e49f01f9ba4" alt="image" width="2280" height="824" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-10.png" />

## 应用功能介绍：

开发完成后，你需要添加机器人入群[添加机器人入群](https://open.dingtalk.com/document/dingstart/add-robot-to-group#)，当你@机器人发送“你好”，服务端接收消息格式如下：

<img src="https://mintcdn.com/bazhuayu-rpa-docs/AQoj0la5o3OJK8xY/helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-11.png?fit=max&auto=format&n=AQoj0la5o3OJK8xY&q=85&s=426f92ac1b588b5f8e38176cfc77909a" alt="image" width="2359" height="1051" data-path="helpcenter/commands/custom-commands/lEaGzf0g/images/iJyRKuij-11.png" />

\{

"specVersion": "1.0",

"type": "CALLBACK",

"headers": \{

"appId": "04230b68-51f5-4a1c-82fc-b6fbf533d6e8",

"connectionId": "d140d440-b4c9-11f0-80c0-7e88154b8801",

"contentType": "application/json",

"messageId": "bf8fbd2\_cb7\_19a253627d1\_be1219",

"time": "1761743946669",

"topic": "/v1.0/im/bot/messages/get"

},

"data": "\{"senderPlatform":"Win","conversationId":"cidOiieLDYJxHfrB1hBWzQpEQ==","atUsers":\[\{"dingtalkId":"$:LWCP_v1:$8DTBn0eia1aGdGgC6f7xwcA7d/J5O826"}],"chatbotCorpId":"dingd8b60689774870bd4ac5d6980864d335","chatbotUserId":"$:LWCP_v1:$8DTBn0eia1aGdGgC6f7xwcA7d/J5O826","openThreadId":"cidOiieLDYJxHfrB1hBWzQpEQ==","msgId":"msg7P5xLAscj5F9hsF92D5fxA==","senderNick":"李杰","isAdmin":true,"senderStaffId":"014642481450846306","sessionWebhookExpiredTime":1761749346646,"createAt":1761743946379,"senderCorpId":"dingd8b60689774870bd4ac5d6980864d335","conversationType":"2","senderId":"$:LWCP_v1:$50JPibHrGYbxrBSiKEjpeeugJTCEnq7v","conversationTitle":"机器人接收消息测试群","isInAtList":true,"sessionWebhook":"[https://oapi.dingtalk.com/robot/sendBySession?session=42aaaa8895a53636c7cda100a5cb22ef\\",\\"senderUnionId\\":\\"XiSYLMsEjy52jBIYfHHiiIgwiEiE\\",\\"text\\":\\\{\\"content\\":\\](https://oapi.dingtalk.com/robot/sendBySession?session=42aaaa8895a53636c7cda100a5cb22ef\\",\\"senderUnionId\\":\\"XiSYLMsEjy52jBIYfHHiiIgwiEiE\\",\\"text\\":\\\{\\"content\\":\\)" 你好"},"robotCode":"dingbkjzpxkfcjlhfsat","msgtype":"text"}"

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
