Skip to content

IM Access ​

IM Access connects a Device Agent to Feishu, DingTalk, Slack, Discord, or Telegram. Users can query status and control devices through a bot, or ask the Device Agent to proactively send alerts, query results, and reports to a specific conversation. Create a bot or app, then configure and enable it in Settings → Channels.

When to Use IM Access ​

  • Teams already work in Feishu, DingTalk, or Slack and want to query or control devices from a group chat.
  • A device needs a remote operation entry point without building a separate app or admin portal for every user.
  • Alerts, status queries, and control commands should live in the same conversation context.
  • Device anomalies or completed automation should notify the responsible group or channel.
  • Access should be restricted to specific platform users through an allow list.

Setup Flow ​

  1. Create a bot or app in the third-party platform.
  2. Enable message receiving and copy the credentials issued by the platform.
  3. Open Settings → Channels in the Device Agent console.
  4. Select the platform, configure credentials and the inbound allow list, and enable the channel. In a platform deployment, an administrator configures credentials; check their status on the page.
  5. Save. Restart the service for a local deployment; in a platform deployment, contact the deployment administrator to restart the relevant services, then verify that the settings have taken effect.
  6. Send a DM to the bot, or mention the bot in a group or channel.

Matching local .env variables override page settings at startup. See Apply Behavior for configuration precedence and restart requirements.

What to Prepare in Each Platform ​

PlatformPlatform setupCredentials in Device AgentHow users trigger it
FeishuInternal app, bot capability, long connection event subscriptionApp ID, App Secret, optional Encrypt Key and Verification TokenDM the bot or mention it in a group
DingTalkDingTalk app, bot capability, Stream ModeClient ID, Client SecretDM the bot or mention it in a group
SlackSlack App, Socket Mode, Bot Token, App TokenBot Token, App Token, optional Signing SecretMention the app in a channel or send a DM
DiscordDiscord Application, Bot, Message Content IntentBot TokenDM the bot or mention it in a server channel
TelegramBot created with @BotFatherBot TokenDM the bot, mention it in a group, or reply to the bot

Configure Device Agent ​

Open Settings → Channels and choose the platform to connect. Each platform uses different credentials, but the base fields are shared:

IM channel configuration

FieldPurpose
EnabledStarts the selected IM channel
Allow listPlatform user IDs allowed to access the Device Agent; comma-separated. Empty means no restriction

Use platform user IDs, not display names:

ChannelUser ID
Feishuopen_id, for example ou_xxx
DingTalkEmployee ID or senderStaffId
DiscordUser Snowflake ID
TelegramNumeric user ID
SlackUser ID, for example U01234567

If you do not know the user ID yet, leave the allow list empty, send a test message, then read the sender ID from service logs before tightening access.

Verify Access ​

After the settings take effect, send a simple message from the third-party platform:

text
Which devices are online?

If a device is already online, test status query and control:

text
Show the current status of thermostat-01.
text
Set the target temperature of thermostat-01 to 24 degrees.

DMs usually trigger directly. In groups or channels, users usually need to mention the bot or reply to the bot. After the Device Agent finishes processing, the response is sent back to the same conversation.

Send proactive notifications ​

Use proactive notifications for alerts, inspection results, and business reports. Explicitly request a message in conversation, or add Send IM message to a Workflow so matching device reports trigger it.

Before sending, check that:

  1. The IM channel is enabled and the bot has permission to send to the target.
  2. The bot has joined the target group or channel, or has an available conversation with the target user.
  3. The request or workflow specifies the channel, target, and message.

The inbound allow list controls who can send requests to the Device Agent. The send target controls where a message goes. Their ID formats can differ: Feishu uses a user's open_id for inbound access and a conversation's chat_id for sending.

ChannelSend target formatExample
FeishuConversation chat_idoc_xxx
DingTalkJSON identifying a group or user; groups use openConversationId, users use employee ID{"kind":"group","id":"group-conversation-id"} or {"kind":"user","id":"employee-id"}
SlackJSON containing a channel ID; add threadTs to reply to a specific thread{"channelId":"C01234567"}
DiscordTarget channel ID123456789012345678
TelegramTarget chat ID; group IDs can be negative-1001234567890

Get target identifiers from the platform’s administration interface or received-message logs. Use those identifiers rather than group names, nicknames, or allow-list user IDs.

For example, after enabling Feishu and obtaining the target chat_id:

text
Query this Device Agent's online devices. Send a brief report with the online count and offline device list to Feishu conversation oc_xxx.

Replace the example ID with the actual target. If a send confirmation appears, check the destination and content before confirming. After execution, verify receipt in the third-party platform. For failed workflow sends, check the run result, channel state, and target permissions.

Conversation and message support ​

In groups, specify the device and goal rather than relying on context from another conversation. See Configure Device Agent and Verify Access for message triggers and access restrictions.

Feishu supports text, rich text, images, and voice-to-text; other channels mainly support text. IM message support differs from device-side multimedia access. For device-side setup, see Voice Interaction, Camera and Vision, and Simulated Display.

Compared With Other Conversation Entry Points ​

Entry pointPurpose
Console Chat UIBuilt-in entry point for creation, debugging, device selection, status views, and manual control. See Use a Device Agent.
HTTP Chat APIFor custom web apps, mobile apps, or business systems that need to embed Device Agent conversations.
IM AccessFor third-party chat platforms, so users can work with Device Agents from existing collaboration tools.
Device-side voice and visionFor real devices with microphones, cameras, or screens, connected through the device SDK and multimedia capabilities.