A tool to remove your own slack messages.
deslackify can only delete messages that you sent. The token you provide
authenticates as your own account, so it cannot remove messages authored by
other users.
pip install deslackifyNote: Slack discontinued legacy tokens in 2020, so they can no longer be generated. Use a Slack app user token instead:
- Create a new app at https://api.slack.com/apps ("From scratch").
- Under OAuth & Permissions, add the following User Token Scopes:
search:readandchat:write. - Click Install to Workspace and authorize the app.
- Copy the User OAuth Token (it begins with
xoxp-); use it asTOKENbelow.
deslackify --token TOKEN USERNAMEBy default deslackify will remove USERNAME's messages that are more than a
year old. You may also manually specify a before date via:
deslackify --token TOKEN --before YYYY-MM-DD USERNAMENote: If no results are found, you may need to replace USERNAME with
USERID. You can find the USERID by going to Profile & Account, and then
clicking the three dots, and at the bottom, "Copy member ID".