我们如何通过Microsoft Graph API或Graph SDK将自适应卡发送到Microsoft Teams渠道。甚至有可能吗?
谢谢!
答案 0 :(得分:2)
您可以使用Create chat message in a channel图形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)
}]
}