# Prevent Slack from unfurling anything for login-required sites

**URL:** <https://meta.discourse.org/t/prevent-slack-from-unfurling-anything-for-login-required-sites/75233>\
**Category:** Support\
**Created:** [2017年十二月2日 12:52 UTC](https://meta.discourse.org/t/prevent-slack-from-unfurling-anything-for-login-required-sites/75233 "2017-12-02T12:52:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [2017年十二月2日 21:16 UTC](https://meta.discourse.org/t/prevent-slack-from-unfurling-anything-for-login-required-sites/75233/4 "2017-12-02T21:16:38Z")

</div>

I’m not sure if you’re already aware of this option - apologies if so.

> [@Discourse Slackdoor Plugin](https://meta.discourse.org/t/discourse-slackdoor-plugin/44632/1):
>
> When you post a message that starts with a link to a post or a topic in your private Discourse instance, a bot will post a message that contains the unfurled content as a reply.

The Slack API has a section on “Slack App Unfurling”. From a brief read it looks like you can do some clever stuff with the API which replaces slack’s default unfurling for specific links with your own logic. Maybe discourse-slackdoor could be adapted to use this method, rather than the existing “sends a message in response” method?

Using this API would also mean users can put the link anywhere in their message, rather than only at the beginning.

> **[Unfurling links in messages | Slack Developer Docs](https://docs.slack.dev/messaging/unfurling-links-in-messages/)**
>
> When users post messages in Slack containing links, we attach previews, adding context and continuity to conversations. Three facets of link unfurling exist:

---

_[View the full topic](https://meta.discourse.org/t/prevent-slack-from-unfurling-anything-for-login-required-sites/75233)._
