Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for Slack integration setup #32

Open
asterikx opened this issue May 30, 2020 · 4 comments
Open

Improve documentation for Slack integration setup #32

asterikx opened this issue May 30, 2020 · 4 comments

Comments

@asterikx
Copy link

@asterikx asterikx commented May 30, 2020

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

@stale
Copy link

@stale stale bot commented Jun 30, 2020

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.

@stale
Copy link

@stale stale bot commented Jul 30, 2020

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.

@stale
Copy link

@stale stale bot commented Aug 30, 2020

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.

@stale
Copy link

@stale stale bot commented Sep 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.