This article shows you how to make a slack bot.
Go to this URL https://api.slack.com/
Press "Your Apps" in the upper right
At this point, the person who is displayed as "Go to Slack" cannot log in to the slack workspace, so let's log in.
If you press the button while logged in
This screen will appear, so press "Create an App".
Enter the app name and select the workspace you want to add.
You have now created a bot account.
The created account is displayed near the center of the page, so click on it.
After that, click "OAuth & Permissions" in the left bar.
You may need to make a note of the "Bot User OAuth Access Token" at the top center as you will need it later (you can also see it later).
If you scroll down, there is an item called "Bot Token Scopes", so if you press the button "Add an OAuth Scope", you can give authority to the bot, so you need "channels: read" and "chats:" to create this bot. "write" is added.
At this time, you may be wondering, "Isn't it okay to add all the privileges?", But if you give all the privileges, the damage will be minimized when a malfunction occurs. Because.
If you select "OAuth & Permissions" and then select "Install App to Workspace" at the top "OAuth Tokens & Redirect URLs"
A screen like this will appear, so select "Allow". You have now added the bot to your workspace.
Recommended Posts