Skip to content

bboe/deslackify

Repository files navigation

deslackify

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.

Installation

pip install deslackify

Obtaining a Slack Token

Note: Slack discontinued legacy tokens in 2020, so they can no longer be generated. Use a Slack app user token instead:

  1. Create a new app at https://api.slack.com/apps ("From scratch").
  2. Under OAuth & Permissions, add the following User Token Scopes: search:read and chat:write.
  3. Click Install to Workspace and authorize the app.
  4. Copy the User OAuth Token (it begins with xoxp-); use it as TOKEN below.

Running

deslackify --token TOKEN USERNAME

By 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 USERNAME

Note: 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".

About

A program to delete old slack messages.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages