All Products
Search
Document Center

OpenAPI Explorer:Subscribe to API changes by using a webhook

Last Updated:Sep 13, 2023

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:

  1. 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 image.png in the upper-right corner.

  2. In the Group Settings panel, click Bot.

  3. In the Robot Management dialog box, click Add Robot.

  4. Click Custom (Custom message services via Webhook). In the robot details message, click Add.

  5. 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.

    Note

    You must add the keyword as required. Otherwise, messages may fail to be sent because the keyword is not matched.

  6. 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.

    image.png
  7. In the top navigation bar of OpenAPI Explorer, click API Changes. On the API Changes page, changes of Alibaba cloud APIs are displayed.

  8. 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.

    image.png

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.