问题
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"
}
]
}
With this I receive a 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?
回答1:
Webhooks do not yet support Adaptive Cards. We plan to add support for Adaptive Cards shortly after we release them for bots.
来源:https://stackoverflow.com/questions/50753072/microsoft-teams-webhook-generating-400-for-adaptive-card