Slack URL to open a channel from browser
Asked Answered
O

7

202

This iTunes URL will open The Hitchhiker's Guide to the Galaxy in your iTunes:

itmss://itunes.apple.com/us/audiobook/hitchhikers-guide-to-galaxy/id315596797

This Spotify URL will open ALL by the Descendents in Spotify:

spotify:track:22feF2sbtGydtvx1OeLSih

Does Slack have a URL scheme to open a #channel in the Slack app from a link?

I want to put a link on my team's site that can link to the Slack #channel we use, for use by other people in the company.

Ozmo answered 21/8, 2015 at 18:4 Comment(0)
A
113

The URI to open a specific channel in Slack app is:

slack://channel?id=<CHANNEL-ID>&team=<TEAM-ID>

You will probably need these resources of the Slack API to get IDs of your team and channel:

Here's the full documentation from Slack

Academia answered 12/5, 2016 at 13:3 Comment(6)
Very promising. I don't have the API token of my organization, but that's doing something from Firefox and Safari (not Chrome?).Ozmo
You can get your team id and each channel's id from doing a View Source on the web version of Slack fyi.Annam
This doesn't seem to work for me. slack:// opens the app but the channel/team are ignored.Ihab
More on deep linking here: api.slack.com/docs/deep-linking#open_a_direct_messageStockmon
And more on getting your team and channel IDs here: https://mcmap.net/q/129507/-what-is-the-simplest-way-to-find-a-slack-team-id-and-a-channel-idObreption
This requires the user to be already signed in the specific workspace on the device that we are using the URI on.Chaetopod
T
190

Referencing a channel within a conversation

To create a clickable reference to a channel in a Slack conversation, just type # followed by the channel name. For example: #general.

# mention of a channel

To grab a link to a channel through the Slack UI

To share the channel URL externally, you can grab its link by control-clicking (Mac) or right-clicking (Windows) on the channel name:

grabbing a channel's URL

The link would look like this:

https://yourteam.slack.com/messages/C69S1L3SS

Note that this link doesn't change even if you change the name of the channel. So, it is better to use this link rather than the one based on channel's name.

To compose a URL for a channel based on channel name

https://yourteam.slack.com/channels/<channel_name>

Opening the above URL from a browser would launch the Slack client (if available) or open the slack channel on the browser itself.

To compose a URL for a direct message (DM) channel to a user

https://yourteam.slack.com/channels/<username>
Tampere answered 2/11, 2017 at 17:30 Comment(2)
I like /channels links: very convenient and straightforward. I checked that they also work for people DM channels: use yourteam.slack.com/channels/person to open @person DM.Istic
It is possible to add some text query string to redirect with a message?Herewith
A
118

Sure you can:

https://<organization>.slack.com/messages/<channel>/

for example: https://tikal.slack.com/messages/general/ (of course that for accessing it, you must be part of the team)

Acrophobia answered 14/12, 2015 at 20:21 Comment(7)
Maybe I should have been more specific, but I want to open the Slack app from a link. I've edited the question.Ozmo
Are you sure that everyone installed the desktop app and that everyone has the same OS (Windows? Mac?) Also activating an application from within a browser is a security risk.Acrophobia
The OS shouldn't matter if this is enabled, as the browser is launching the application. It's also not a security risk to do this, lots of apps have this capability. It's a link for people with the Slack app, so they'll only click it if they have Slack.Ozmo
Slack app activation is different on different OS - you don't activate the Mac app with the same command as the Windows appAcrophobia
The OS will prompt you if it doesn't recognize the custom protocol handler, but if Slack has this enabled, then it wouldn't be a problem.Ozmo
It's a pretty common thing called Deep Links, or URI schemes, iTunes has had it for years.Englebert
Just as a side-note, these links only allow access to those that are already a member of the relevant organisation. For example, in the demo link given above, you need to have the rights to access Tikal.slack.com. Otherwise it will tell you that your account details are incorrect.Johnsten
A
113

The URI to open a specific channel in Slack app is:

slack://channel?id=<CHANNEL-ID>&team=<TEAM-ID>

You will probably need these resources of the Slack API to get IDs of your team and channel:

Here's the full documentation from Slack

Academia answered 12/5, 2016 at 13:3 Comment(6)
Very promising. I don't have the API token of my organization, but that's doing something from Firefox and Safari (not Chrome?).Ozmo
You can get your team id and each channel's id from doing a View Source on the web version of Slack fyi.Annam
This doesn't seem to work for me. slack:// opens the app but the channel/team are ignored.Ihab
More on deep linking here: api.slack.com/docs/deep-linking#open_a_direct_messageStockmon
And more on getting your team and channel IDs here: https://mcmap.net/q/129507/-what-is-the-simplest-way-to-find-a-slack-team-id-and-a-channel-idObreption
This requires the user to be already signed in the specific workspace on the device that we are using the URI on.Chaetopod
R
20

This link opens the channel in the browser

https://<org-name>.slack.com/channels/<channel-name>

This link opens up the slack channel in the App

https://<org-name>.slack.com/archives/<channel-name>
Rebatement answered 18/3, 2021 at 9:10 Comment(0)
A
8

You can use

slack://

in order to open the Slack desktop application. For example, on mac, I've run:

open slack://

from the terminal and it opens the Mac desktop Slack application. Still, I didn't figure out the URL that should be used for opening a certain team, channel or message.

Acrophobia answered 19/4, 2016 at 1:58 Comment(0)
G
5

When I tried yorammi's solution I was taken to Slack, but not the channel I specified.

I had better luck with:

https://<organization>.slack.com/messages/#<channel>/

and

https://<organization>.slack.com/messages/<channel>/details/

Although, they were both still displayed in a browser window and not the app.

Gordy answered 28/3, 2016 at 22:43 Comment(2)
Right, I'm aware of the URL for slack messages. My only goal is to have it open in the app.Ozmo
Correction to the first link above (do not include the hash): https://<organization>.slack.com/messages/<channel>/Hydrograph
S
0

What you need is this:

slack://channel?team=your workspace id&id=channel id

This will tell the browser to open the Slack App and take you to the given channel in the given workspace.

The problem I see is that Slack does not give you an easy way to copy this URL. Instead, it gives you the option to copy the https://your workspace name.slack.com/archives/channel id of a channel, which will also work, if your browser supports it, but it will leave behind an ugly empty new browser tab opened.

Suppurative answered 15/5, 2023 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.