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

后端 未结 9 840
时光取名叫无心
时光取名叫无心 2020-12-07 10:46

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,

9条回答
  •  粉色の甜心
    2020-12-07 11:07

    Team ID

    The easiest way to get your team ID is to use the Slack API method auth.test with your access token.

    Channel ID

    Depends on if you want a public or private channel you can call the respective Slack API method to get a list of all channels incl. their IDs.

    • Public channel: channels.list
    • Private channel: groups.list

    Note that you can only see private channels in which the user/bot that belongs to your access token has been invited into.

    Accesss Token

    To get the access token you can either request a "test token" on the Slack API page under "Test Token" (only recommended for testing purposes by Slack). Or you can create a Slack app and install that app for your Slack team using Oath which will also generate an app specific access token.

提交回复
热议问题