This topic describes how to obtain the webhook URL of a DingTalk chatbot and receive subscription messages by using the webhook URL.
Prerequisites
A DingTalk group that is used to receive subscription messages is created.
Procedure
To add a custom chatbot to the DingTalk group and obtain the webhook URL of the DingTalk chatbot, perform the following steps:
Run the DingTalk client on a PC, go to the DingTalk group to which you want to add a chatbot, and then click the Group Settings icon in the upper-right corner.
In the Group Settings panel, click Bot.
In the Robot Management dialog box, click Add Robot.
Click Custom (Custom message services via Webhook). In the robot details message, click Add.
In the Robot Management dialog box, configure the parameters that are described in the following table. Then, select I have read and accepted 《DingTalk Custom Robot Service Terms of Service》 and click Finished.
Parameter
Description
Chatbot name
Set the Chatbot name to API change messages.
Add to Group
The group to which API change messages are sent.
Security Setting
Select Custom Keywords for the Security Setting parameter, and specify Change as the custom keyword.
NoteYou must add the keyword as required. Otherwise, messages may fail to be sent because the keyword is not matched.
In the Robot Management message, copy the webhook URL and click Finished. Then, the custom DingTalk chatbot is successfully added to the DingTalk group.
For more information about operations that are related to webhooks, see Add a custom DingTalk chatbot.
In the top navigation bar of OpenAPI Explorer, click API Changes. On the API Changes page, changes of Alibaba cloud APIs are displayed.
On the API Changes page, click Subscribe in the upper-right corner. In the Subscription change panel, configure the subscription parameters. Select Webhook as the Notification type. Copy the Webhook URL to the Contact information box, and click OK to complete the subscription.
Check whether the webhook URL receives messages. For more information, see the "Test the custom chatbot" section of the Add a custom DingTalk chatbot topic.