kfei / slack-cleaner

:speech_balloon: Bulk delete messages and files on Slack
MIT License
1.24k stars 144 forks source link

slacker.Error message #59

Open philsinatra opened 6 years ago

philsinatra commented 6 years ago

Installed slack-cleaner via pip without an issue. Goal is to remove all files in the account, however when running the command I get the following feedback:


$ sudo slack-cleaner --token SECRET --file --user "*" --rate=1
Running slack-cleaner v0.3.0
Traceback (most recent call last):
  File "/usr/local/bin/slack-cleaner", line 7, in <module>
    from slack_cleaner.cli import main
  File "/Library/Python/2.7/site-packages/slack_cleaner/cli.py", line 61, in <module>
    init_user_dict()
  File "/Library/Python/2.7/site-packages/slack_cleaner/cli.py", line 52, in init_user_dict
    res = slack.users.list().body
  File "/Library/Python/2.7/site-packages/slacker/__init__.py", line 164, in list
    return self.get('users.list', params={'presence': int(presence)})
  File "/Library/Python/2.7/site-packages/slacker/__init__.py", line 90, in get
    api, **kwargs
  File "/Library/Python/2.7/site-packages/slacker/__init__.py", line 72, in _request
    raise Error(response.error)
slacker.Error: invalid_auth
onhernandes commented 6 years ago

+1

sgratzl commented 6 years ago

how did you create the secret token?

jtagcat commented 3 years ago

Same issue. URL https://api.slack.com/apps/<redacted>/oauth?success=1

image

image

Added both user and bot scopes as a troubleshooting step. Tried both bot and user tokens, and with, without --bot.