我希望有一个充当链接的松弛按钮,单击该按钮会将用户重定向到我的网站。松弛的新api有可能吗?
是,可以使用block kit。您所要做的就是在button
内添加actions
并提供url
。单击后,它将重定向到https://google.com,并向api发送请求。
Block Kit代码:
{
"blocks": [
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Click me"
},
"style": "primary",
"value": "click_me",
"url": "https://google.com"
}
]
}
]
}