この記事は「OAuth & Permissions」や「Event Subscriptions」での「Bot Token Scopes」のようなスコープの設定に関しての作業メモです。
パブリックなチャンネルの投稿を取得するときはmessage:channels
やchannels:history
を利用しますが、プライベートチャンネルだとそれが使えませんでした。
以下は、「Event Subscriptions」の「Subscribe to events on behalf of users」の設定した時の説明文ですが、わかりやすかったのでメモ。
Event Name | Description | Required Scope |
---|---|---|
message.channels | A message was posted to a channel | channels:history |
message.groups | A message was posted to a private channel | groups:history |
とりあえずslack botのscopeはchannelsがpublic、groupsがprivateとメモしておきます。