Skip to main content
This example describes how to send messages through a group assistant.
  1. Select the target app and go to the app details page. Click Basic information > Credentials and basic information.
  2. Obtain the app’s Client ID and Client Secret.
  3. Request the API permission to send group assistant messages.
  4. Obtain the app’s access credential. See Obtain the access token of an internal app.
  5. On the Scenario group page in the developer backend, request a Bot. Once approved, obtain the bot ID parameter robotCode.
  6. On the Scenario group page in the developer backend, create a group template and obtain the group template ID parameter template_id.
  7. Bind the scenario group Bot to the scenario group template, save the edits, and return to the group scenario list.
  8. Open the corresponding group template, submit it for review, and click Publish.
  9. Call the create group API with template_id to obtain openConversationId.
  10. Call the send group assistant message API to send a Bot group message.

Prerequisites

Complete the Create an app process.

Steps

  1. Select the target app and go to the app details page. Click Basic information > Credentials and basic information.
  2. Obtain the app’s Client ID and Client Secret.
  3. Click Development configuration > Manage permissions. Enter qyapi_chat_manage in the permission search box and request the permission.
  4. Obtain the app’s access credential. See Obtain the access token of an internal app. When calling the API, use the access token to authenticate the caller’s identity.
  5. On the Scenario group page in the developer backend, request a Bot and obtain the bot ID parameter robotCode.

Note

Requesting a Bot requires review. Once approved, you can view the ID, as shown in the figure below.
  1. On the Scenario group page in the developer backend, create a group template and obtain the group template ID parameter template_id.
  2. Bind the scenario group Bot to the scenario group template, save the edits, and return to the group scenario list.
  3. Open the corresponding group template, submit it for review, and click Publish.

Note

The review is approved automatically. No manual approval is required.
  1. Call the create group API with template_id to obtain openConversationId.
  2. Call the send group assistant message API to send a Bot group message.