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

lfboulanger picture lfboulanger · Dec 2, 2016 · Viewed 89.2k times · Source

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?

Answer

Philipp picture Philipp · Jul 3, 2017

Here is the easiest way to manually find the slack IDs

1. Any channel ID

Open the slack webpage (http://yourteam.slack.com) and then simply open the channel. The channel ID is displayed in the browser URL:

get any channel ID


2. Any user ID

To find a user ID you need to open your browser dev-tools console and inspect the user-link in the sidebar. The user ID can be found in the HTML attribute "data-member-id":

get any user ID

Or in slack: (1) Click on the users name and choose (2) "Show Profile". Then open the "..." menu and you see the option (3) "Copy Member-ID ..." - to get your own user ID via the UI, you have to click the Team-Logo in top-left corner and then choose "Profile & Account" (this is not included in the screenshot)

get team members user ID


3. Team ID

Simply open the dev-tools of your browser, switch to the "Console" tab and enter the text boot_data.team_id into the console. This will display your team ID:

get the team ID