Improve documentation for Slack integration setup
Opened this issue · 5 comments
The README describes adding the channels::history
scope to the app.
However, different scopes seem to be required. CloudWatch logs for the Slack notifier Lambda contain the following error message:
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "Error: An API error occurred: missing_scope",
"reason": {
"errorType": "Error",
"errorMessage": "An API error occurred: missing_scope",
"code": "slack_webapi_platform_error",
"data": {
"ok": false,
"error": "missing_scope",
"needed": "channels:read,groups:read,mpim:read,im:read",
"provided": "channels:history",
"response_metadata": {
"scopes": [
"channels:history"
],
"acceptedScopes": [
"channels:read",
"groups:read",
"mpim:read",
"im:read"
]
}
},
"stack": [
"Error: An API error occurred: missing_scope",
" at Object.platformErrorFromResult (/var/task/node_modules/@slack/web-api/dist/errors.js:50:33)",
" at WebClient.apiCall (/var/task/node_modules/@slack/web-api/dist/WebClient.js:491:28)",
" at process._tickCallback (internal/process/next_tick.js:68:7)"
]
},
"promise": {},
"stack": [
"Runtime.UnhandledPromiseRejection: Error: An API error occurred: missing_scope",
" at process.on (/var/runtime/index.js:37:15)",
" at process.emit (events.js:198:13)",
" at process.EventEmitter.emit (domain.js:448:20)",
" at emitPromiseRejectionWarnings (internal/process/promises.js:140:18)",
" at process._tickCallback (internal/process/next_tick.js:69:34)"
]
}
It appears that the scopes channels:read, groups:read, mpim:read, im:read
are required (instead of channels:history
?).
Slack is deprecating a lot of methods in favor of their new Conversations API (see #33). The required scopes might possibly change as well
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.