如何通过微软Graph APISDK向微软团队发送自适应卡?

问题描述 投票:0回答:1

我们如何通过Microsoft Graph API或Graph SDK将自适应卡发送到Microsoft Teams通道。这是否可行?

谢谢。

c# azure microsoft-graph microsoft-teams microsoft-graph-teams
1个回答
0
投票

你可以通过以下方式发送自适应卡 在一个频道中创建聊天信息 Graph API。下面是一个示例代码。

body: {
"body": {
"contentType": "html",
"content": "<attachment id="04b151bb-2f88-4f5b-9615-30b2a59d9adf">"
},
"attachments":[{
"id": "04b151bb-2f88-4f5b-9615-30b2a59d9adf",
"contentType": "application/vnd.microsoft.card.adaptive",
"content": JSON.stringify(card.attachments[0].content)
}]
}
© www.soinside.com 2019 - 2024. All rights reserved.