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

Missing scope error: But scopes present on Slack #27

Open
Tycho-S opened this issue Feb 17, 2019 · 4 comments
Open

Missing scope error: But scopes present on Slack #27

Tycho-S opened this issue Feb 17, 2019 · 4 comments

Comments

@Tycho-S
Copy link

Tycho-S commented Feb 17, 2019

This is another issue I'm seeing: I keep getting a missing scope from slack:

slackarchive-bot_1       | 2019/02/17 20:49:26 Syncing latest channel messages: C1U1G6PGR
slackarchive-bot_1       | nlopes/slack2019/02/17 20:49:26 misc.go:74: parseResponseBody: {"ok":false,"error":"missing_scope","needed":"channels:history","provided":"identify,bot:basic"}

However the scopes are actually present:

image

I did of course try to reinstall the app. I even tried to recreate the bot. I also tried to include both tokens (not just the xoxb but also the xoxp) in the slackarchive-bot yaml file, because this was mentioned here that it needs both tokens: #24 (comment)

But then I get a different error (that it can't connect to the RTM):

slackarchive-bot_1       | nlopes/slack2019/02/17 21:01:02 misc.go:74: parseResponseBody: {"ok":false,"error":"missing_scope","needed":"rtm:stream","provided":"identify,bot,channels:history,channels:read,team:read,users:read"}
slackarchive-bot_1       | nlopes/slack2019/02/17 21:01:02 websocket_managed_conn.go:140: Failed to start or connect to RTM: missing_scope

This is how I added both:

tokens:
 - xoxb-xxx
 - xoxp-xxx

So it looks like the scopes are correctly set (as they do show in the second example) but for some reason are not applying to the bot I've created. Sorry for my ignorance here, I've never used the Slack API at all. I did read all the relevant issue topics (the last one on this post is really relevant: #24 (comment) - and probably should be part of the readme, as well as the elasticsearch info). But I still can't get it to work.

By the way is there an IRC channel to discuss about slackarchive? Or a slack perhaps?

@mdiluz
Copy link

mdiluz commented Apr 29, 2019

Sorry - I don't have a fix, but I appear to have the same issue with some another unrelated slack bot - I have the permissions, but the user bot token also gets missing_scope and for a different unrelated reason the bot token isn't a viable option.

Did you find a solution to this?

@Tycho-S
Copy link
Author

Tycho-S commented Apr 29, 2019

Nope, never did :(

I kinda gave up on it (reminds me I'm still paying for the Scaleway instance I installed it on, I have to wipe it :) ). It's a straightforward install so I don't really understand why it's happening but it's hard to troubleshoot inside docker containers.

@mdiluz
Copy link

mdiluz commented Apr 29, 2019

Ha! Well, if I solve mine I'll report back :)

@mdiluz
Copy link

mdiluz commented May 8, 2019

This was fun, from a Slack help email chain:

I'm sorry for the confusion but the bot token is the bot user token. If it starts with xoxb, it's a bot token.

As in, for the Token type listed in API documentation, bot matches up with the Bot User OAuth Access Token and user matches up with the OAuth Access Token.

This is obviously incredibly confusing, but alas, that's what the issue was for me - don't know how that will help you though.

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

2 participants