A python slack exporter
- Go to https://api.slack.com/apps
- Create an app
- Under 'Features' go to 'OAuth & Permissions'
- Add 'channels:history', 'channels:read', 'groups:history', 'groups:read', 'im:history', 'im:read', 'mpim:history', 'mpim:read', 'files:read', and 'users:read' to 'User Token Scopes'
- Install the app to workspace
- Copy the 'User OAuth Token'
# Export Private Channels and Group DMs and 1:1 DMs
python slack_export.py --token xoxs-123... --groups --directMessages
# Export "my_private_channel1" and "my_private_channel2" Private Channel
python slack_export.py --token xoxs-123... --groups my_private_channel1 my_private_channel2
# Export the Private Channels and Group DMs you select when prompted
python slack_export.py --token xoxs-123... --groups --prompt