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

Migration to non-legacy bots #252

Closed
dblock opened this issue Apr 1, 2020 · 6 comments · Fixed by #260
Closed

Migration to non-legacy bots #252

dblock opened this issue Apr 1, 2020 · 6 comments · Fixed by #260

Comments

@dblock
Copy link
Collaborator

dblock commented Apr 1, 2020

The rtm integration is now legacy. See #251. What do we need to do to un-legacy a slack-ruby-bot?

@voscarmv
Copy link
Contributor

voscarmv commented Apr 1, 2020

I've prepared this google document to illustrate the trouble I ran into when trying to get a New Slack App to work with my Stackbot project

The document contains the sequence of steps I took to try to communicate with the new Slack API using my project. My Stackbot works fine with a Classic Slack App. However, it returns an error message when trying to communicate with a New Slack App.

There is some documentation for migrating classic apps apparently. However, it's beyond my skill set, and I probably won't have the time right now to go through the learning curve. I hope the information I've posted here at least helps as a starting point.

Cheers!

@dblock
Copy link
Collaborator Author

dblock commented Apr 1, 2020

Thanks, this step-by-step guide explains clearly the issue in #241. The newer bots require that you install them via oauth, which is what https://github.com/slack-ruby/slack-ruby-bot-server is about (which uses this library).

@dblock
Copy link
Collaborator Author

dblock commented Apr 1, 2020

@voscarmv You can turn your bot project into one of those bots with a "add to slack" button fairly easily, then you don't have to do any of the token work by hand.

@voscarmv
Copy link
Contributor

voscarmv commented Apr 1, 2020

@dblock I'll check it out, thanks!

@wasabigeek
Copy link
Contributor

wasabigeek commented May 5, 2020

Based on what I can tell from slack-ruby-server, the new OAuth token can be used as a drop-in replacement for the classic token, and it's valid till manually revoked (no refresh)? So the quick approach might be to migrate via Slack's UI and do the OAuth process manually to obtain the token, and then use that as SLACK_API_TOKEN 🤣

If we want to support the OAuth flow in this repo, then that means the user must:

  • setup an API to handle the authorization grant
  • have a persistence option to save the token

On our end, maybe:

  • allow the App to run without tokens configured, and have users update the token in the authorization grant API? (I guess that could be problematic without other changes throughout the codebase)

@dblock Is this what you were thinking of? Or was it something more along the lines of "how do I migrate from this to slack-ruby-server"?

@dblock
Copy link
Collaborator Author

dblock commented May 5, 2020

@dblock Is this what you were thinking of? Or was it something more along the lines of "how do I migrate from this to slack-ruby-server"?

I think the latter, and/or some clarification in README to what people are supposed to do. One option is use slack-ruby-bot-server, another is roll out your own oauth (for which we don't have an example).

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

Successfully merging a pull request may close this issue.

3 participants