我们使用MSTeams应用程序令牌创建了一个使用图形APi的群聊天,它返回聊天id如下所示,
请求: POST https://graph.microsoft.com/beta/chats令牌: App令牌
{
"chatType": "group",
"topic":"SrinithK",
"members": [
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": ["owner"],
"user@odata.bind": "https://graph.microsoft.com/beta/users('user6e96-xxxx-xxxx-b9cf-84095bdxxxxx')"
},
{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"roles": ["owner"],
"user@odata.bind": "https://graph.microsoft.com/beta/users('bot19295-xxxx-xxxx-8793-c102f1dbxxxx')"
}
]
}答复:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#chats/$entity",
"id": "19:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@thread.v2",
"topic": "SrinithK",
"createdDateTime": "2022-01-17T12:28:48.406Z",
"lastUpdatedDateTime": "2022-01-17T12:28:48.406Z",
"chatType": "group",
"webUrl": "https://teams.microsoft.com/l/chat/xxxxxxxxxxxxxxxxxxxxthread.v2/0?tenantId=xxxxxxx-xxxx-4095-829b-xxxxxxxx",
"tenantId": "xxxxxxx-xxxx-4095-829b-xxxxxxxx",
"viewpoint": null,
"onlineMeetingInfo": null
}在创建此聊天时,我们不会接收任何包含ServiceUrls和其他数据的事件。
我们需要使用Bot令牌发布一个Bot消息到这个聊天,使用BOT REST v3。
有没有任何方法可以捕获聊天创建事件和发布消息所需的其他数据?
发布于 2022-01-17 13:37:49
我还没有完全测试它,所以这只是一个建议,但我认为需要有第一个真正的消息发送到聊天,以完全初始化它。在创建团队之后,尝试使用图形发送这个初始消息,它应该将初始的conversationUpdate发送给你的机器人。
https://stackoverflow.com/questions/70741674
复制相似问题