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

Documentation for usage in a distributed Slack app #239

Closed
xWee opened this issue Jun 28, 2016 · 4 comments
Closed

Documentation for usage in a distributed Slack app #239

xWee opened this issue Jun 28, 2016 · 4 comments
Labels
docs M-T: Documentation work only
Milestone

Comments

@xWee
Copy link

xWee commented Jun 28, 2016

I'm looking at creating an app for Slack that can be installed across multiple different Slack teams. This SDK works great with one team. As many people add the app to slack via "Add to Slack" button, I get their bot_access_token. Now how should I run the code with so many Slack tokens. How can I do this?
This is solution on Ruby.

@DEGoodmanWilson DEGoodmanWilson added the question M-T: User needs support to use the project label Jun 28, 2016
@DEGoodmanWilson
Copy link

This is an excellent question. I don't have a good answer for you at the moment, but I'll be researching this and getting back to you—and then sharing the result in our documentation as well! Meanwhile, if others here have solutions they'd like to share, I think hearing a number of different voices might be helpful.

@DEGoodmanWilson DEGoodmanWilson added docs M-T: Documentation work only Priority—Medium labels Jun 28, 2016
@andrewpbrett
Copy link

The bot I've been working on is installed across ~100 teams right now and runs on Heroku: https://github.com/beeminder/beebot

It might be terribly, terribly wrong, but I created an endpoint to store the tokens in Redis and then when the app restarts, fetch all those keys and create a Slack RTM client for each one. If people have ideas or suggestions for improvement let me know! Hope it's helpful for you to see.

@aoberoi aoberoi removed Priority—Medium question M-T: User needs support to use the project labels Oct 3, 2017
@aoberoi
Copy link
Contributor

aoberoi commented Oct 3, 2017

i think @andrewpbrett has got the right idea. ideally you are storing your access tokens in some persistent storage, and you read from that storage whenever you need to instantiate a client. i think its valid to keep this issue around as a docs issue, and we potentially need to surface better examples or even a step-by-step guide.

i'm going to take @xWee's mention of the ruby bot framework as a request for a higher level framework take this information to that issue. #409

@aoberoi aoberoi changed the title How to use this SDK with many teams? Documentation for usage in a distributed Slack app Oct 3, 2017
@aoberoi
Copy link
Contributor

aoberoi commented Oct 3, 2017

worth noting: there is the @aoberoi/passport-slack package that is useful for handling the OAuth flow. its likely to become an officially supported package sometime in the future.

@aoberoi aoberoi added this to the v3.15.0 milestone Oct 27, 2017
@aoberoi aoberoi mentioned this issue Dec 22, 2017
2 tasks
@aoberoi aoberoi closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only
Projects
None yet
Development

No branches or pull requests

4 participants