Skip to content

Instantly share code, notes, and snippets.

@wojtek1150
wojtek1150 / bulk-delete-slack.js
Last active March 13, 2024 13:26
Delete all slack messages
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://app.slack.com/client/COMPANY_ID/CHANNEL_ID
// User id in on the browser URL.: https://app.slack.com/client/COMPANY_ID/CHANNEL_ID/user_profile/USER_ID
// Token can get from: https://api.slack.com/custom-integrations/legacy-tokens
// Pass it as a parameter: node ./bulk-delete-slack.js TOKEN CHANNEL_ID USER_ID DELAY
// Or use it without download the script: curl -Ls RAW_GIST_URL | node - TOKEN CHANNEL_ID
// GLOBALS #############################################################################################################