问题描述
我有一个到Teams频道的可正常使用的网络挂钩,可以成功向其发布消息.我现在正尝试将自适应卡发布到网络挂钩上.使用邮递员并发布到 https://outlook.office.com/webhook/xyz ,标题中的Content-Type
设置为application/json
,主体中设置了以下自适应卡.
I have a functioning webhook to a Teams channel to which I can successfully post messages. I am now trying to post an adaptive card to the webhook. Using Postman and performing a Post to https://outlook.office.com/webhook/xyz, with Content-Type
set to application/json
in the header and the following adaptive card set in the body.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"speak": "Nothing to say.",
"body": [
{
"type": "TextBlock",
"text": "Hello Teams' user"
}
]
}
由此我收到一个HTTP 400错误请求,并且摘要或文本为必填消息.有谁知道Teams Webhooks是否支持自适应卡还是当前不支持的任务?
With this I receive a HTTP 400 Bad Request and Summary or Text is required message. Does anyone know if Teams webhooks support Adaptive Cards yet or if this is an unsupported task currently?
推荐答案
Webhooks尚不支持自适应卡!我们计划在发布用于机器人的自适应卡后不久增加对它们的支持.
Webhooks do not yet support Adaptive Cards! We plan to add support for Adaptive Cards shortly after we release them for bots.
这篇关于Microsoft Teams Webhook为自适应卡生成400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!