1. アプリ作成
api.slack.com/apps → 「Create New App」→「From scratch」→ アプリ名とワークスペースを選択
2. Socket Mode を有効化
左メニュー「Socket Mode」→ Enable → Token名を入力して生成 → xapp- で始まるトークン = App Token
3. Event Subscriptions 設定
左メニュー「Event Subscriptions」→ Enable Events → 「Subscribe to bot events」に以下を追加:
message.im
message.groups
message.channels
app_mention
message.mpim
4. OAuth & Permissions 設定(カテゴリ別)
左メニュー「OAuth & Permissions」→ 「Bot Token Scopes」に以下を追加:
個人秘書カテゴリのスコープ
Bot Token Scopes — 必須:
app_mentions:read
chat:write
im:history
im:read
im:write
users:read
App-Level Token Scopes:
connections:write
組織共通カテゴリのスコープ
Bot Token Scopes — 必須:
app_mentions:read
channels:history
channels:read
chat:write
groups:history
groups:read
im:history
im:read
im:write
users:read
任意(必要に応じて):
reactions:read
files:read
App-Level Token Scopes:
connections:write
5. アプリをインストール
「OAuth & Permissions」→「Install to Workspace」→ 許可 → xoxb- で始まるトークン = Bot Token
6. Signing Secret の取得
左メニュー「Basic Information」→「App Credentials」→ Signing Secret の「Show」をクリックしてコピー