我有兴趣使用基于csharp的团队机器人执行以下操作:
我能够使用图形通信API完成步骤1和2。 我的机器人可以执行许多其他任务,例如(1)接收和回复个人消息,(2)发送主动消息,(3)处理撰写消息传递扩展调用,(4)添加该机器人并发送到群组聊天等。
但是,我尝试了几种方法进行第3步,但都没有奏效。尝试将消息发送到对话时,我收到此403 Forbidden错误:
{"error":{"code":"BotNotInConversationRoster","message":"The bot is not part of the conversation roster."}}
我也查看了这个github线程: https://github.com/microsoft/BotBuilder-Samples/issues/1772
我曾尝试以与将机器人添加到群聊中类似的方式将机器人添加到在线会议中,但是在线会议对话未出现在搜索屏幕中(当(1)从进入机器人的信息页面时“应用”菜单,然后(2)单击“添加到聊天”,然后(3)尝试在出现的“选择要开始使用MyBot的聊天”搜索窗口中查找对话)
发送消息的请求看起来像这样:
POST https://smba.trafficmanager.net/amer/v3/conversations/19:meeting_XXXXXXXXXXXXXXXXXXXXXXXXXXXX@thread.v2/activities/f:2XXXXXXXXXXXXX
Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: application/json; charset=utf-8
{
"type": "message",
"serviceUrl": "https://smba.trafficmanager.net/amer/",
"channelId": "msteams",
"from": {
"id": "28:5fXXXXXXXXXXXXXXXXXXXXXX",
"name": "HelpDesk Bot"
},
"conversation": {
"id": "19:meeting_XXXXXXXXXXXXXXXXXXXXXXXXXXXX@thread.v2",
"tenantId": "XXXXXXXXXXXXXXXXXXXX"
},
"recipient": {
"id": "29:12XXXXX-XXXXXXX-XXXXXXXXXXXXXX",
"name": "SupportTest",
"aadObjectId": "XXXXXXXXXXXXXXXXXXXXXXX"
},
"text": "Welcome to the support session.",
"inputHint": "acceptingInput",
"attachments": [],
"entities": [],
"replyToId": "f:2XXXXXXXXXXXXX"
}
我做错什么了吗?
编辑:添加了会议聊天室中可用菜单的更多屏幕截图: Online meeting menu Compose menu
-汤姆