0

So, we are trying to implement slack integration with our product, botkit uses json_file_store to store channel, team, user related information, why does botkit stores such data? Is there way to avoid storing such data on production environment? or should I use any other slack bot client?

1 Answers1

1

You can read more about how and why Botkit stores data here: https://botkit.ai/docs/storage.html

Youll want to use at least the simple storage to keep track of things like team/user/channel id in slack, especially if the bot is to be installed or interact with multiple teams or users. This data does not persist like using a dedicated storage connector, and if you are worried about data leakage you can use the Events API in concert with Botkit middleware to limit the data that is sent to the app too and from slack. https://botkit.ai/docs/readme-pipeline.html

Peter Swimm
  • 111
  • 1
  • 4
  • Thanks for the reply! Since we are on the topic, I have another question, I was going through botkit documentation, controller.createOauthEndpoints() enables two urls 'http://_your_server_/login' and 'http://_your_server_/oauth', so when I go to the first url it shows me page to authorize the app, even though I have authorized the app while installing it earlier, I have go to the first url and authorize the app again otherwise it won't work, can you just explain the significance of this step? because I simply don't understand why the user has to go through the same process twice. – Satishkumar sahu Jul 17 '18 at 05:08
  • This information is part of why there is a simple storage object. If you are constantly asked to re-add the bot my guess is: - You cannot do a file based json because you are on an environment that doesnt support it, in which case you should use one of the storage connectors like the mongo connector. - From your message above you are altering the simple storage code and now It cannot save the team tokens you get when you add the bot to your team. – Peter Swimm Jul 18 '18 at 14:19