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

invalid_auth #24

Open
jdjabbour opened this issue Nov 3, 2018 · 4 comments
Open

invalid_auth #24

jdjabbour opened this issue Nov 3, 2018 · 4 comments

Comments

@jdjabbour
Copy link

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
Copy link
Author

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
Copy link
Member

nl5887 commented Nov 14, 2018

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
Copy link

pospi commented Jan 28, 2019

@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:

  • Add a bot user for the app. This should also automatically install the bot permission scope.
  • Also add the team:read, channels:history, channels:read & users:read permission scopes to the app.
  • Install the app to your workspace to ensure it's in sync
  • Copy both OAuth tokens to the slackarchive-bot config, under the tokens key
  • Reboot the archiver and it should all work

@gubatron
Copy link

gubatron commented May 18, 2019

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
...

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

No branches or pull requests

4 participants