Forum Discussion
Posting adaptivecard to teams incoming webhooks
My original message was truncated. Here's the payload that will successfully POST because it is missing the `actions` section:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"type": "AdaptiveCard",
"schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.6",
"body": [
{
"text": "🚀 testing",
"wrap": true,
"size": "Large",
"weight": "Bolder",
"color": "Good",
"type": "TextBlock"
},
{
"facts": [
{
"title": "DeploymentId: ",
"value": "dep-id-123"
}
],
"type": "FactSet"
}
]
}
}
]
}
- Meghana-MSFTJan 17, 2024Former Employee
troyhart - We checked the payload with `actions`. We also got Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 400 with ContextId 01=2 error. We see that
height property accepts "auto" or "stretch". After changing the height value from automatic to auto/stretch, JSON is working fine.Please change this value to "auto" or "stretch" and try to send the payload again. Please confirm if this helps?
- troyhartJan 19, 2024Copper Contributor
Thank you! That worked. It's interesting to note that the invalid height value does not consistently break the POST. I have some channels that continue to accept the POST with a height of "Automatic". Also, the channels whose webhooks are consistently not accepting the POSTs now did accept them at one time.
- Meghana-MSFTJan 22, 2024Former Employee
troyhart - Glad your issue has been resolved. Kindly share your feedback via https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7iCOpS5_b9Nqmwx43u5rtZUOThVR081SllSR05aSDQxQ0tUMDVPTVIxTi4u link. We see that invalid height value breaks consistently. We checked by giving heigh value as "Automatic" and it is failing every time. We tried to send the card to multiple channels.