Open the URL in the browser from the Message button using the Slack API

I send users a laxative message using the button through the Slack App. Each time I click the button, I create a new URL.

At the moment, I can return the URL as a message. The user clicks on the message to open the URL in the browser.

Instead of sending the message back, I want to open the URL directly in the browser using the slack API.

How can i do this? I can not find anything in the documentation that does this.

thanks

PS: integration with Google Drive does it already.

+5
source share
2 answers

Unfortunately, slack does not support opening URLs from message buttons. You can follow what slack plans to release here: https://trello.com/b/ZnTQyumQ/slack-platform-roadmap-for-developers :)

+9
source

Looks like Slack recently introduced this feature.

As described at https://api.slack.com/docs/message-attachments#link_buttons

"actions": [ { "type": "button", "text": "Book flights 🛫", "url": "https://flights.example.com/book/r123456" } 

Can be viewed in Slack interactive builder

+6
source

Source: https://habr.com/ru/post/1259229/


All Articles