无法从Microsoft Teams消息卡的有效操作按钮发送http发布请求

问题描述 投票:0回答:1

我正在通过包含发帖请求的按钮将卡片发送到Microsoft Teams频道。当我单击按钮时,出现以下错误:

“发送失败

无法完成请求的操作。请稍后再试。“

@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "{SUMMÁRIA}",
"themeColor": "0078D7",
"title": "{TÁJ} - {TÓÉ} ",
"sections": [
    ...sectionDescription],
"potentialAction": [
    {
    "name": "BUTTON LABEL",
    "target": "https://<targetURL>",
    /* I also tried this one "headers": [{
    "name": "Authorization",
    "value": "Basic base64",
    }, {"name" : "Content-Type", "value": "application/json"}],*/
    "headers": [{"Authorization": "Basic <BASE64STUFF>"}, {"Content-Type": "application/json"}, ],
    "@type": "HttpPOST",
    "url": "https://<TARGETURL>",
    "bodyContentType": "application/json",
    "body": JSON.stringify({
        "buildType": {
            "id": "hereisTheid"
        },
        "comment": {
            "text": "message"
        },
        "properties": {
            "property": [{
                    "name": "proprety",
                    "value": "valueofproperty"
                },
                {
                    "name": "properyt",
                    "value": "valueofProperty"
                }
            ]
        },
    }),
    },
    {
        "@type": "HttpPOST",
        "name": "View Build",
        "target": "https://....."
    },
    {
        "@type": "HttpPOST",
        "name": "Test results",
        "target": "http://..."
    }
]

我如何确定按钮的响应?

http-post webhooks microsoft-teams
1个回答
0
投票

我完全没有使用MessageCard,所以这只是一个建议,以防万一-您是否尝试过在Web客户端而不是台式机客户端中使用Teams?因为您可以使用浏览器F12开发人员工具,所以可能对此有更好的了解。

© www.soinside.com 2019 - 2024. All rights reserved.