|
|
|
|
@@ -55,8 +55,14 @@ Use this Slack app manifest to create the app quickly (adjust the name/command i
|
|
|
|
|
"channels:history",
|
|
|
|
|
"channels:read",
|
|
|
|
|
"groups:history",
|
|
|
|
|
"groups:read",
|
|
|
|
|
"groups:write",
|
|
|
|
|
"im:history",
|
|
|
|
|
"im:read",
|
|
|
|
|
"im:write",
|
|
|
|
|
"mpim:history",
|
|
|
|
|
"mpim:read",
|
|
|
|
|
"mpim:write",
|
|
|
|
|
"users:read",
|
|
|
|
|
"app_mentions:read",
|
|
|
|
|
"reactions:read",
|
|
|
|
|
@@ -92,6 +98,44 @@ Use this Slack app manifest to create the app quickly (adjust the name/command i
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Scopes (current vs optional)
|
|
|
|
|
Slack's Conversations API is type-scoped: you only need the scopes for the
|
|
|
|
|
conversation types you actually touch (channels, groups, im, mpim). See
|
|
|
|
|
https://api.slack.com/docs/conversations-api for the overview.
|
|
|
|
|
|
|
|
|
|
### Required by current code
|
|
|
|
|
- `chat:write` (send/update/delete messages via `chat.postMessage`)
|
|
|
|
|
https://api.slack.com/methods/chat.postMessage
|
|
|
|
|
- `im:write` (open DMs via `conversations.open` for user DMs)
|
|
|
|
|
https://api.slack.com/methods/conversations.open
|
|
|
|
|
- `channels:history`, `groups:history`, `im:history`, `mpim:history`
|
|
|
|
|
(`conversations.history` in `src/slack/actions.ts`)
|
|
|
|
|
https://api.slack.com/methods/conversations.history
|
|
|
|
|
- `channels:read`, `groups:read`, `im:read`, `mpim:read`
|
|
|
|
|
(`conversations.info` in `src/slack/monitor.ts`)
|
|
|
|
|
https://api.slack.com/methods/conversations.info
|
|
|
|
|
- `users:read` (`users.info` in `src/slack/monitor.ts` + `src/slack/actions.ts`)
|
|
|
|
|
https://api.slack.com/methods/users.info
|
|
|
|
|
- `reactions:read`, `reactions:write` (`reactions.get` / `reactions.add`)
|
|
|
|
|
https://api.slack.com/methods/reactions.get
|
|
|
|
|
https://api.slack.com/methods/reactions.add
|
|
|
|
|
- `pins:read`, `pins:write` (`pins.list` / `pins.add` / `pins.remove`)
|
|
|
|
|
https://api.slack.com/scopes/pins:read
|
|
|
|
|
https://api.slack.com/scopes/pins:write
|
|
|
|
|
- `emoji:read` (`emoji.list`)
|
|
|
|
|
https://api.slack.com/scopes/emoji:read
|
|
|
|
|
- `files:write` (uploads via `files.uploadV2`)
|
|
|
|
|
https://api.slack.com/messaging/files/uploading
|
|
|
|
|
|
|
|
|
|
### Not needed today (but likely future)
|
|
|
|
|
- `mpim:write` (only if we add group-DM open/DM start via `conversations.open`)
|
|
|
|
|
- `groups:write` (only if we add private-channel management: create/rename/invite/archive)
|
|
|
|
|
- `chat:write.public` (only if we want to post to channels the bot isn't in)
|
|
|
|
|
https://api.slack.com/scopes/chat:write.public
|
|
|
|
|
- `users:read.email` (only if we need email fields from `users.info`)
|
|
|
|
|
https://api.slack.com/changelog/2017-04-narrowing-email-access
|
|
|
|
|
- `files:read` (only if we start listing/reading file metadata)
|
|
|
|
|
|
|
|
|
|
## Config
|
|
|
|
|
Slack uses Socket Mode only (no HTTP webhook server). Provide both tokens:
|
|
|
|
|
|
|
|
|
|
|