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

Solution 1:

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

Solution 2:

Slightly different answer to the existing ones.

Whenever I wanted to just find out quickly what the relevant ids are for a specific team, I just opened the Slack web client and inspected the relevant elements. (Using Chrome Dev Tools)

https://my.slack.com/messages

The <a> tag that links to a user tends to include a data-member-id attribute, the content of which is the user id.

The same holds true for channels. If you inspect any of the channels in the sidebar, you can see they are ordered as <li> list elements each containing the channel id in the class name.

For the team id, you can open the entire source of the slack web client and CTRL-F for your team_domain (e.g. myslack55 for myslack55.slack.com) and that should find you the team id.

Basically, it's all hidden in plain sight. You just need to know where to look ;)