我正在向Microsoft Teams频道发送一张卡片,卡片上有一个包含post请求的按钮。当我点击按钮时,我得到了以下错误:
“发送失败
无法完成请求的操作。请稍后再试。“
@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://..."
}
]如何识别按钮的响应?
发布于 2020-01-13 23:25:40
我根本没有使用过MessageCards,所以这只是一个建议,以防它能有所帮助--你有没有尝试过在web客户端而不是桌面客户端中使用团队?它可能会提供更好的视图,因为您可以访问浏览器F12开发人员工具。
发布于 2020-01-14 06:46:02
您的URL是否被域名白标允许?
https://stackoverflow.com/questions/59719288
复制相似问题