Replies: 2 comments 1 reply
-
Hey @rmacklin , thank you for your feedback and suggestion. The import "github.com/rusq/slackdump/v2/auth" I actually never thought of this, because "auth" is very specific to Slackdump, I did not think that anyone would use it in a conjunction with other applications, but I do agree, maybe it would make sense to create a wrapper that returns a "user-authenticated" "slack.Client". Do you have any existing examples of automations that could reuse that? It would be interesting to see how they authenticate to get the idea how generic should the library be (it's ok if not, I'm just curious). |
Beta Was this translation helpful? Give feedback.
-
One popular (but possibly unmaintained) tool that I found is https://github.com/jpbruinsslot/slack-term, which links to manual instructions to get a token, referencing another project's other manual instructions which references yet another project's manual instructions (hence the first sentence of my post 😆). Personally, the reason I'd started looking at Slack-related CLI repos on GitHub was that I was thinking of writing a simple CLI to update my slack status from the terminal (or from other automations). A while back, I wrote a tool to scrape some Slack history and I "solved" auth by literally mimicking my browser session (Dev Tools -> Network Tab -> "Copy as cURL" -> remove unneeded bits and wrap in parameterized shell script -> call it a day), but this time I decided to see if someone had published a better auth solution. (FWIW, I did also find some repos like https://github.com/mivok/slack_status_updater in line with what I wanted to build - that one's README actually suggests creating a whole Slack app to handle auth after the legacy token approach became deprecated.) Additionally, I came across https://github.com/chriszarate/SlackNotifier.spoon recently and liked the idea, but saw it was written before legacy tokens were phased out. It's not written in golang but it could be modified to call a go executable instead of hitting the Slack API directly. Those are the examples that drove me to post here :) |
Beta Was this translation helpful? Give feedback.
-
After browsing through a few different Slack-related CLI repos on GitHub that all have manual instructions for how to get the appropriate token and cookie combination, I came across yours - it looks like you've done a bunch of work to 1) automate the process as much as possible and 2) store the credentials securely. Props! This got me wondering if other Slack automations could reuse the encrypted credentials... Curious if you have any thoughts on extracting a library to enable this. Bad idea? Good idea?
Beta Was this translation helpful? Give feedback.
All reactions