About Slack Message Deleter

This tool lets you delete your own messages in a Slack channel—either all of them or only those containing a specific keyword. Nothing you enter is saved or stored anywhere.

How it works

  1. You fill in the form with your Slack workspace details and credentials (see below).
  2. When you click "Delete messages", the app asks Slack for the message history in the channel you chose.
  3. It finds messages sent by you. If you entered a keyword, it only deletes messages that contain that word (case-insensitive). Otherwise it deletes all your messages in that channel.
  4. It sends a delete request to Slack for each message, one at a time, with a short delay to avoid rate limits.
  5. When finished, it shows you how many messages were deleted.

What you need

All of these are used only for the delete run. They are never saved in this app, in a database, or in the repository.

Workspace

Your Slack workspace hostname, e.g. your-company.slack.com. You see it in the browser when you use Slack in the web app.

Target Channel ID

The ID of the channel (or DM) whose messages you want to delete. Open that channel in Slack in the browser, then check the URL. It often looks like /archives/C01234ABCD or /messages/D08FLHCR2AY. The channel ID is the part after the last slash.

Current User ID

Your own Slack user ID (starts with U). You can find it by opening your profile in Slack or by checking the URL when you view your own profile. It looks like U08FLHAN268.

Token

A Slack session token (often starts with xoxc-). You can get it from the browser: open Slack in the web app, open Developer Tools (F12), go to Application → Cookies (or Storage), find the cookie for your Slack domain, or in Network tab look at request headers for a request to Slack. The token is sensitive: treat it like a password and never share it or commit it to code.

Keyword (optional)

If you leave this empty, the app will delete all your messages in the chosen channel. If you enter a word or phrase (e.g. chacha), only messages whose text contains that keyword (case-insensitive) will be deleted.

Messages per request

How many messages Slack returns per API call (between 1 and 1000). The default is 1000, which is Slack’s maximum. The app fetches history in batches of this size and deletes your matching messages from each batch. You usually don’t need to change this unless you want smaller batches (e.g. for testing).

We don’t save anything

No data is stored. Your workspace, channel ID, user ID, token, cookie, and keyword are only used for the duration of the request. They are sent from your browser to our server (to avoid Slack’s CORS restrictions), and the server uses them only to call Slack’s API. We do not log them, save them to a database, or write them to the repository. The codebase and this app are designed so that nothing you enter is persisted.

Technical note

The form runs in your browser. Because Slack’s API does not allow direct browser requests from other origins (CORS), the app uses a small server-side API route that receives your form data and forwards the requests to Slack. That route does not store the data; it only uses it for the delete run and then discards it.

Thanks

This project was inspired by slack-message-deleter by huytd. Thank you for the inspiration.