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

This only works with "classic" slack apps #63

Closed
leetrout opened this issue Jul 18, 2020 · 11 comments · Fixed by #70
Closed

This only works with "classic" slack apps #63

leetrout opened this issue Jul 18, 2020 · 11 comments · Fixed by #70

Comments

@leetrout
Copy link

I think the README should be updated to indicate it uses the RTM API which does not function with new slack apps that have granular oauth permissions.

Took me 40 minutes to figure out what was going on by finally dropping the debug option in the config and seeing:

slack-go/slack2020/07/18 13:56:31 websocket_managed_conn.go:177: Connecting to RTM
slack-go/slack2020/07/18 13:56:32 rtm.go:71: Using URL:
slack-go/slack2020/07/18 13:56:32 websocket_managed_conn.go:181: Failed to start or connect to RTM: not_allowed_token_type
slack-go/slack2020/07/18 13:56:32 websocket_managed_conn.go:147: reconnection 1 failed: not_allowed_token_type reconnecting in 100ms
...

It is possible to still create apps that use the old permissions scopes but they are pushing everything to the events API.

More info in this thread slackapi/node-slack-sdk#921 (comment)

@shomali11
Copy link
Owner

Interesting. We will have to look into this further and see how it affects slacker and what we need to do to support both cases.

@leetrout
Copy link
Author

Interesting. We will have to look into this further and see how it affects slacker and what we need to do to support both cases.

I am happy to help out if you're willing to entertain supporting both APIs. You never know with various projects where they draw the line.

Would you entertain PRs or think you're going to do the work yourself?

@shomali11
Copy link
Owner

Absolutely! Some of the features here we suggested and/or created by awesome contributors!
I definitely think we need to support both APIs just in case somehow. The question is how to make it as easy and intuitive to the user of slacker

I did some research. At the time when nlopes started the go-slack project, there was only support for RTM and slacker was built on top of that (https://github.com/slack-go/slack/blob/master/examples/websocket/websocket.go)

It seems that go-slack now supports an Events API as seen here (https://github.com/slack-go/slack/blob/master/examples/eventsapi/events.go). I wonder if we can leverage this somehow.

@leetrout
Copy link
Author

Yeah, it looks like there is a relatively straightforward path to combine the command definitions with the events as they show up. I'm excited because this will let it run in lambda / cloud functions, too 😎

@cameronbrill
Copy link

Checking to see if you guys are wanting to work on adding support to Events API. If so, I want to help out as well.

@shomali11
Copy link
Owner

@cameronbrill Create a PR! Any help is very much appreciated

@arusso
Copy link
Collaborator

arusso commented Jan 21, 2021

With the introduction of Socket-Mode communication protocol and support for it being added to upstream in slack-go, I think that means we have all the pieces needed to use the Events API via Sockets-Mode without having to re-architect your app to listen for calls from Slack on a public http endpoint.

@shomali11
Copy link
Owner

Awesome! Can you put a PR together?

@arusso
Copy link
Collaborator

arusso commented Jan 21, 2021

Anything coming from me will take a while, as I am encumbered by policy and need to get approvals from my employer before I can contribute anything.

@paulkarayan
Copy link

paulkarayan commented Mar 10, 2021

Do you want a PR for updating the Readme? would have saved me an hour today :)
of course - Slacker is going to save me many hours now... all is good. Let me know!

@tvhung83
Copy link

tvhung83 commented Mar 11, 2021

I hope you can update README, and/or log out fatal errors. It took me hours to figure out that it only supports legacy bot token (by enabling DEBUG mode).

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

Successfully merging a pull request may close this issue.

6 participants