Search code examples
htmlslack-apislack

What is the simplest way to find a slack team ID and a channel ID?


We are trying to setup deep linking into slack, as described here:

https://api.slack.com/docs/deep-linking

The document states that to open a specific team, the following URL should be used:

slack://open?team={TEAM_ID}

Open Slack and switch teams to the specified team. The provided TEAM_ID should be a string, like T12345.

Furthermore, to open a channel in a team, the following URL should be used:

slack://channel?team={TEAM_ID}&id={CHANNEL_ID}

Open the channel specified by the CHANNEL_ID provided in the id field, like C024BE91L. You must also specify the team with a TEAM_ID.

My question is simple. Where can I find out what TEAM_ID I need and what CHANNEL_ID I need?


Solution

  • As of July 2019, it seems like the team id and the channel id is already being shown via the web.

    enter image description here

    As you can see in the screenshot, the 2nd to the last node is the team id (prefixed with "T") and the last node is the channel id (prefixed with "C"). All you have to do is open slack via the web, go to the specific channel, and you can see the url change to something close to the screenshot above.