简体   繁体   English

MS Teams - 获取安装机器人的团队 ID 和频道 ID

[英]MS Teams - fetch the team Ids and channel Ids in which the bot is installed

I have developed a bot in MS Teams and i want to fetch the channel Ids where the bot is installed and can send the messages.我在 MS Teams 中开发了一个机器人,我想获取安装机器人的频道 ID 并可以发送消息。 Any ideas how to do this, thanks a lot任何想法如何做到这一点,非常感谢

You can only really do this when there's an interaction from the user, so for example when the user sends your bot a message.只有当用户进行交互时,您才能真正做到这一点,例如当用户向您的机器人发送消息时。 The best time of all, however, is when your bot is actually installed, because then you have it right from the beginning.然而,最好的时间是你的机器人实际安装的时候,因为你从一开始就拥有它。 You use the ConversationUpdate event, as described here .您使用 ConversationUpdate 事件,如此所述。

If it's too late for that (your bot is installed already), then I'm only aware of waiting for the next message - I'm not sure if it's possible to get things like the conversation id another way.如果为时已晚(您的机器人已经安装),那么我只知道等待下一条消息 - 我不确定是否有可能以另一种方式获得诸如对话 ID 之类的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 以编程方式将机器人 (ms-botbuilder) 添加到 MS Teams 团队/频道 - Add bot (ms-botbuilder) to the MS Teams Team/Channel programmatically 在团队机器人中获取图形兼容的团队和对话ID - Getting graph-compatible Team and conversation IDs in a Teams bot Bot 未连接到 MS Teams 频道 - Bot not connecting to MS Teams Channel 在个人范围(MS Teams)中安装机器人时如何获取团队ID? - How to get team id when the bot is installed in personal scope(MS Teams)? 如何在安装在不同组织的 MS Teams Bot 中接收用户照片? - How to receive user photos in MS Teams Bot which installed in different organizations? 不提及 MS Teams 机器人就无法接收频道消息 - Unable to receive channel message without mentioning MS Teams bot Bot Framework V4 MS 团队渠道和 GDPR - Bot Framework V4 MS teams channel and GDPR 微软团队 | Microsoft bot 框架 - 在任务/获取时返回 502 错误 - MS Teams | Microsoft bot framework - Returns 502 error on task/fetch MS Bot Framework 类名称和标签 ID 已更改 - MS Bot Framework class names and label IDs are changed 如何通过 ms 团队应用程序中的自适应卡发送团队 ID 和频道 ID - How can send Team ID and Channel id through adaptive card from ms teams app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM