我想要一个可用作链接的 slack 按钮,它会在用户点击时将其发送到我的网站。使用松弛的新 api 可能吗?
是的,可以使用block kit。您所要做的就是添加一个button
内部actions
并提供url
. 单击时,它将重定向到https://google.com,并向 slack api 发送请求。
块套件代码:
{
"blocks": [
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Click me"
},
"style": "primary",
"value": "click_me",
"url": "https://google.com"
}
]
}
]
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1029 次 |
最近记录: |