# Allow Slack to unfurl/expand links to "login-required" Discourse instance

**URL:** <https://meta.discourse.org/t/allow-slack-to-unfurl-expand-links-to-login-required-discourse-instance/39547>\
**Category:** Feature\
**Created:** [2016 年 2 月 14 日午前 3:02 UTC](https://meta.discourse.org/t/allow-slack-to-unfurl-expand-links-to-login-required-discourse-instance/39547 "2016-02-14T03:02:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)\
**Post date:** [2016 年 5 月 7 日午後 3:05 UTC](https://meta.discourse.org/t/allow-slack-to-unfurl-expand-links-to-login-required-discourse-instance/39547/2 "2016-05-07T15:05:00Z")

</div>

I’m going to investigate working on this because I think it would add a ton of value to our private instance.

Here’s what I’m thinking:

1. **In Slack** Configure an [outgoing web hook](https://api.slack.com/outgoing-webhooks) in slack
  - `trigger_word=myforum.domain.com`
  - `token=someToken`
  - `URLs=https://myforum.com/slackdoor/`
  - `text=the original chat message body that includes myforum.domain.com in there`

2. **In Discourse** Add `/slackdoor` endpoint to Discourse
  - `site_setting:slackdoor_token=someToken`
  - `check that requestbody.token=site_setting.slackdoor_token`
  - `parse requestbody.text field for URL`
  - retrieve post data from the post associated with the URL
  - respond with a rich body compatible with slacks [message attachment api](https://api.slack.com/docs/attachments)

Is part (2) of this plugin territory? Or something that belongs in core? (Or has anyone done something like this already that I haven’t seen yet).

---

_[View the full topic](https://meta.discourse.org/t/allow-slack-to-unfurl-expand-links-to-login-required-discourse-instance/39547)._
