Slack: Difference between revisions
From charlesreid1
| Line 27: | Line 27: | ||
* What is the signature of each webhook? (How does slack sign each of these messages?) | * What is the signature of each webhook? (How does slack sign each of these messages?) | ||
To get the API | Now you can create a bot by going to the Slack API apps page (https://api.slack.com/apps/) and create a new app. (A bot is one of several types of apps.) | ||
Now you are ready to create your new bot. Answer the questions, provide the required info, and create the bot. | |||
To get the appliation's API client token and client secret token (app-specific, not workspace-specific), go to Settings > Basic Information from the app's app page (<code>https://api.slack.com/apps/<app-id></code>). These keys are used to prove to the API that you are the true owner of the app. | |||
Once you finish creating the app, set up/install to a workspace. Pick which workspace to add it to, and when you are finished you should be given two different API keys: | |||
* OAuth Access Token | |||
* Bot User OAuth Access Token | |||
Latest revision as of 18:26, 19 September 2018
Creating Apps
Slack "Apps" refer to any kind of program that interacts with Slack.
There are five categories of apps:
- incoming webhooks (respond to external events)
- interactive components (buttons, ui)
- slash commands (providing actions)
- event subscriptions (responding to slack activity)
- bots (exchange information with users)
You also need to set the permissions correctly for the bot.
Link to create app: https://api.slack.com/apps/ACWAU18AD?created=1
Creating Bots
To create a bot, you will need the following information:
- What workspace will the bot live in?
- What username should the bot have?
- What is the app ID for this application?
- What is the API client ID?
- What is the API client secret?
- What is the signature of each webhook? (How does slack sign each of these messages?)
Now you can create a bot by going to the Slack API apps page (https://api.slack.com/apps/) and create a new app. (A bot is one of several types of apps.)
Now you are ready to create your new bot. Answer the questions, provide the required info, and create the bot.
To get the appliation's API client token and client secret token (app-specific, not workspace-specific), go to Settings > Basic Information from the app's app page (https://api.slack.com/apps/<app-id>). These keys are used to prove to the API that you are the true owner of the app.
Once you finish creating the app, set up/install to a workspace. Pick which workspace to add it to, and when you are finished you should be given two different API keys:
- OAuth Access Token
- Bot User OAuth Access Token