dutchcoders / slackarchive

Archiver for Slack Teams
299 stars 28 forks source link

invalid_auth #24

Open jdjabbour opened 5 years ago

jdjabbour commented 5 years ago

I cannot for the life of me figure out what auth keys I need to make this application work. I followed the instructions to the T and still I keep getting auth errors for both slackarchive and slackarchive-bot. Am I supposed to be getting these keys from somewhere else or just making them up as I go along? I tried both using random keys as well as using my slack OAuth keys and form some reason nothing works. Has anyone else figure this out?

jdjabbour commented 5 years ago

Actually let me be clear. When I run the importer I get: GetTeamInfo: invalid_auth. When I used docker-compose up slackarchive-bot I get: nlopes/slack2018/11/03 03:54:10 misc.go:74: parseResponseBody: {"ok":false,"error":"invalid_auth"} When I run docker-compose up slackarchive it seems to not be able to find my team.. But I am not sure if I am even doing this one correctly since I am not sure how to import my zip files into Mongodb...

nl5887 commented 5 years ago

The importer should be used to import archives from zip:

https://github.com/dutchcoders/slackarchive-import

But invalid_auth sounds like an invalid Slack API token.

pospi commented 5 years ago

@nl5887 is correct, it's an invalid API token.

This isn't documented, but you need to go to https://api.slack.com/apps and create a new app for your workspace. Following that, set the following configuration:

gubatron commented 5 years ago

I had a similar issue, I was using the App's verification token, instead I should've been using the chatbot's user oath token.

I then went to https://api.slack.com/apps, selected my app, and then went into the "OAuth & Permissions section", then I used the "Bot User OAuth Access Token" instead and voila!

slack-bot: 2019/05/18 15:40:41 websocket_managed_conn.go:171: Connecting to RTM
Event Received: slack-bot: 2019/05/18 15:40:42 misc.go:127: parseResponseBody {"ok":true,"url":"wss:\/\/cerberus-xxxx.lb.slack-msgs.com\/websocket\/xfIHbrJ142Xe4AquJOJxIp
...