Connects a DingTalk, WeCom, Feishu or Slack bot to an agent. The integration is enabled at once and starts in status pending. DingTalk, Feishu and Slack credentials are verified with the platform before anything is saved (an access-token exchange or auth.test — no message is sent); WeCom credentials are checked by connecting, so follow status with Get IM Integration. A bot can be connected only once. You also need write access to read_write_project_id and search access to each read-only project.
Permission required:workspace:integration_manage on workspace_id
When you set read_write_project_id: project:mem_add on read_write_project_id
When you set read_only_project_ids: project:mem_search on read_only_project_ids
Connection state. pending right after a create or a credential change until the first connection attempt; poll Get IM Integration to follow it. One of: pending, connected, error, disabled.
Short normalized reason when status is error, for display (Chinese, the console’s wording; it may change). Never contains the platform’s raw response. Use status_error_code in programs.
Stable reason code, present whenever status_error is. credentials_invalid: the platform rejected the credentials (fix them); subscribe_rejected: WeCom refused the subscription — wrong credentials or the platform’s rate limit, retried automatically; preempted: another connection took over the bot, usually the same bot connected from another environment; timeout / disconnected / connection_aborted / connection_failed: connection problems, retried automatically; dependency_unavailable: a service this deployment depends on is down, retried automatically; dependency_misconfigured: this deployment lacks something the channel needs (WeCom needs Redis) — contact the operator; internal_error: a fault on our side; unknown: the reason was recorded before codes existed, and is replaced on the next connection attempt. New codes may be added; treat an unrecognised one like connection_failed.