I want to send a direct message to a Slack user which contains a website link in its text. Here is the text,
var msgText="Find us on < http://www.google.com|Google>";
and then POST,
method: "POST", url: "https://slack.com/api/chat.postMessage",
body: { "token": slackBotToken, "as_user":true, "channel":"@UserId","text":msgText}
This is what I get on my Slack account,
I want to remove the URL suggestion, any idea how to do that?
Thanks
I got the answer from Slack Support, and I have verified that he is correct:
Thanks for getting in touch, and sorry for the troubles with unfurling. It's quite hidden in our documentation (we'll make it more clear), but in order to completely prevent link unfurling within a particular message, you'll need to set both
unfurl_links
andunfurl_media
tofalse
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With