Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
781 views
in Technique[技术] by (71.8m points)

html - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...