如何通过 Microsoft Graph API/SDK 向 Microsoft 团队发送自适应卡片?
How to send a Adaptive card to Microsoft teams via Microsoft Graph API/SDK?
我们如何通过 Microsoft Graph API 或 Graph SDK 将自适应卡片发送到 Microsoft Teams 频道。有可能吗?
谢谢!
您可以使用 Create chat message in a channel 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)
}]
}
我们如何通过 Microsoft Graph API 或 Graph SDK 将自适应卡片发送到 Microsoft Teams 频道。有可能吗?
谢谢!
您可以使用 Create chat message in a channel 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)
}]
}