![ホワイト先生](https://hello.schoomy.com/wp-content/uploads/2021/09/ホワイト先生アイコン.png)
ホワイト先生
SlackAPIブロックを使うには、事前に準備が必要になります。
SlackAPIを使う作成には、事前にアプリを作成してワークスペースにインストールする必要があります。
以下の手順を参考に、Slackの設定を行ってください。
目次
ワークスペースにログインし、Slack API: Applications にアクセスし、
Create New APPをクリックします。
Create New APPをクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/1-1024x487.png)
From scratchをクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/2-1024x525.png)
任意のアプリ名、ワークスペースを選択し、Create APP をクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/3-1-1024x529.png)
この時点でアプリが作成されます。
OAuth & Permissions をクリック。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/6-1-1024x507.png)
下にスクロールしていくとScopes という欄が出てくるので、
Bot Token Scopes の Add OAuth Scopeをクリックします。
Bot Token Scopes の Add OAuth Scopeをクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/08/04.png)
検索ボックスが出てきます
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-165103-1.png)
検索ボックスにchat:write と入力すると検索候補にchat:writeと項目が出てくるので選択します。
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-172649.png)
下のUser Token scopesも同様に
chat:writeと入力し選択します。
chat:writeと入力し選択します。
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-170721-1.png)
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-171447.png)
OAuth & Permissions(スコープ選択したページ)の上の方に
Install to Workspace ボタンが有効になっているのでクリックします。
Install to Workspace ボタンが有効になっているのでクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/14-1-1024x535.png)
権限をリクエストされるので「許可する」をクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/15-1-1024x527.png)
アプリのインストールに成功すると、トークンが生成されます。
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-180619.png)
Slack でショートカットボタン ⇒ このチャンネルにアプリを追加する の順にクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/07/17-1-1024x590.png)
今回作成したアプリの追加ボタンをクリックします。
![](https://hello.schoomy.com/wp-content/uploads/2023/08/スクリーンショット-2023-08-07-190849.png)
アプリがチャンネルに追加されます!
![](https://hello.schoomy.com/wp-content/uploads/2023/07/16-1024x598.png)
以上でSlackAPIを使うためのアプリが作成され、使用したいワークスペースにインストールされました。
![キャロット](https://hello.schoomy.com/wp-content/uploads/2021/10/-e1635246384572.png)
キャロット
このページのHelloNoは、040404です!