Automate Slack API calls using your browser session credentials.
Try it without installing anything (requires uv):
# 1. Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. Extract credentials (installs playwright browser on first run)
uvx --from "git+https://github.com/shanemcd/slacker" slacker login https://your-workspace.slack.com
# 3. Try it out!
uvx --from "git+https://github.com/shanemcd/slacker" slacker whoami
uvx --from "git+https://github.com/shanemcd/slacker" slacker activity
uvx --from "git+https://github.com/shanemcd/slacker" slacker remindersThat's it! No cloning, no manual installation. All commands in this README work with uvx --from "git+https://github.com/shanemcd/slacker".
For local development or if you prefer a local install:
# 1. Clone and install
git clone https://github.com/shanemcd/slacker
cd slacker
uv sync
uv run playwright install chromium
# 2. Extract credentials
uv run slacker login https://your-workspace.slack.com
# 3. Test authentication
uv run slacker whoamiNote: All commands below show slacker <command>. Prefix with:
uvx --from "git+https://github.com/shanemcd/slacker"for no-install usageuv runif you've installed locally (see Local Development Quick Start above)
Extract credentials from your browser:
slacker login https://your-workspace.slack.com
# Save to custom location (default: ~/.config/slacker/credentials)
slacker --auth-file /path/to/custom/location login https://workspace.slack.comTest authentication and show your user info:
slacker whoami
# Use custom auth file
slacker --auth-file /path/to/custom/location whoamiCall any Slack API endpoint:
# GET request with query parameters
slacker api users.list --params '{"limit": 10}'
# POST request with data
slacker api chat.postMessage --data '{"channel":"general","text":"Hello!"}'
# GET with multiple parameters
slacker api conversations.history --params '{"channel":"C1234567890","limit":50}'
# Specify method explicitly
slacker api conversations.list --method GETExplore available Slack API methods:
# List all API categories
slacker discover
# Show all methods (verbose)
slacker discover --verbose
# Filter by category
slacker discover --category chat
slacker discover --category users
slacker discover --category conversationsCreate Slack reminders using natural language (just like /remind in Slack):
# Create reminders - Slack parses the text naturally
slacker reminder "me to call mom tomorrow at 9am"
slacker reminder "me to review PR in 30 minutes"
slacker reminder "me to check status next Monday"
# You can omit "me to" if you prefer
slacker reminder "call mom tomorrow"
# Send reminder to specific channel (default: your notes channel)
slacker reminder "team meeting tomorrow at 2pm" --channel C1234567890List your saved reminders and "Later" items:
# List all saved items (reminders and saved messages)
slacker reminders
# List only reminders (exclude saved messages)
slacker reminders --reminders-only
# Limit number of results
slacker reminders --limit 10List direct messages with natural language time filtering:
# List today's DM activity (default)
slacker dms
# List DMs since a specific time using natural language
slacker dms --since "yesterday"
slacker dms --since "2 days ago"
slacker dms --since "last Monday"
slacker dms --since "3 hours ago"
# Specific date
slacker dms --since "2025-10-20"Features:
- Shows individual and group DMs
- Displays actual Slack usernames (@handles)
- Shows message direction (incoming/outgoing)
- Message preview (80 characters)
- Natural language date parsing using
dateparser
View your Slack activity feed with enriched details:
# View all activity (mentions, threads, reactions)
slacker activity
# Filter by activity type
slacker activity --tab mentions
slacker activity --tab threads
slacker activity --tab reactionsFeatures:
- Actual usernames (e.g., @alice, @bob) - not generic @user
- Actual team names (e.g., @backend-team, @platform-team) - not generic @team
- Rendered emojis (π», π, π) for standard emojis
- Message previews (80 characters of actual message text)
- Clean formatting (Slack markup removed, URLs cleaned up)
- Unread indicator (β for unread items)
- Fast async performance (~2 seconds for 50 items)
Example output:
Activity Feed - Mentions (50 items):
[mention] 2025-10-21 16:06 in #engineering - by @alice
We are investigating the deployment issue in https://github.com/company/repo/iss...
[mention] 2025-10-21 15:25 in #team-backend - by @bob
@backend-team @alice @charlie @dave The component team's updates on their assign...
β [reaction] 2025-10-21 09:35 in #@charlie - π€£ from @charlie
that was a great demo today...
Record network traffic while interacting with Slack for reverse engineering:
# Interactive mode - prompts for scenario name, press Enter when done
slacker record https://your-workspace.slack.com
# Non-interactive mode - specify scenario, close browser when done
slacker record https://workspace.slack.com --scenario save-message --wait-for-close
# With summary to see top domains and paths
slacker record https://workspace.slack.com --scenario test --summary --wait-for-close
# Save to custom directory
slacker record https://workspace.slack.com --scenario test --output-dir ./my-recordings
# Filter to only specific API calls (check summary first to see which domains are used)
slacker record https://workspace.slack.com --scenario test --filter "edgeapi" --summary
# Skip response bodies for faster/cleaner recording
slacker record https://workspace.slack.com --scenario test --no-bodies --summaryHow it works:
- Opens a browser to your Slack workspace
- Prompts you to name the scenario (e.g., "save-message", "create-reminder")
- Records all network requests/responses while you interact
- Interactive mode: Press Enter when done to save
- Non-interactive mode (
--wait-for-close): Close the browser window when done - Outputs to
./recordings/{scenario}_{timestamp}.json
Tips:
- Use
--no-bodiesto skip response body capture (faster, cleaner) - Use
--summaryfirst to see which domains Slack is using, then filter for them - Use
--wait-for-closefor non-interactive shells or if you prefer closing the browser - The tool auto-detects non-interactive environments (pipes, cron, etc.)
Great for:
- Discovering undocumented API endpoints
- Understanding request/response payloads
- Reverse engineering Slack features
- Building new automation tools
All major commands support JSON output for programmatic processing:
# Get reminders as structured JSON
slacker reminders --output json
# Get DMs in JSON format
slacker dms --since "yesterday" --output json
# Get activity feed in JSON
slacker activity --tab mentions --output json
# Authentication info in JSON
slacker whoami --output json
# API methods in JSON format
slacker discover --category chat --output jsonProcess with jq:
# Extract full message text from saved items
slacker reminders --output json | \
jq '.items[] | select(.type == "message") | .message'
# Get overdue reminder count
slacker reminders --output json | jq '.counts.uncompleted_overdue_count'
# Export saved messages to file
slacker reminders --output json | \
jq -r '.items[] | select(.type == "message") | "\(.date): \(.message)"' > saved.txt
# Get unread mentions with usernames
slacker activity --tab mentions --output json | \
jq '.items[] | select(.is_unread == true) | {channel: .channel_name, user: .username, message: .message_text}'
# Count DMs from yesterday
slacker dms --since "yesterday" --output json | \
jq '.count.dms + .count.group_dms'Discover what's possible:
# See all available API categories
slacker discover
# Explore chat-related methods
slacker discover --category chat
# Call a specific endpoint
slacker api users.list --params '{"limit": 10}'slacker api chat.postMessage --data '{"channel":"general","text":"Hello from slacker!"}'slacker api conversations.list --params '{"limit": 100}'slacker api search.messages --params '{"query":"important"}'slacker api files.upload --data '{"channels":"general","content":"File content","filename":"test.txt"}'# Create reminders using natural language
slacker reminder "me to follow up with team tomorrow at 10am"
slacker reminder "check on deployment in 2 hours"
# List all reminders and saved messages
slacker reminders
# List only reminders
slacker reminders --reminders-only# Morning routine: check all mentions and threads
slacker activity
# See who's reacting to your messages
slacker activity --tab reactions
# Check only @mentions to catch up quickly
slacker activity --tab mentions
# Get unread mentions as JSON for processing
slacker activity --tab mentions --output json | \
jq '.items[] | select(.is_unread == true) | {channel: .channel_name, user: .username}'# Check today's DM activity
slacker dms
# Catch up on weekend messages
slacker dms --since "last Friday"
# After a meeting: check what you missed
slacker dms --since "2 hours ago"# Record network traffic while using a feature (with summary)
slacker record https://workspace.slack.com --summary --wait-for-close
# Then:
# 1. Enter scenario name (e.g., "save-for-later")
# 2. Use the feature in Slack
# 3. Close the browser window when done
# 4. Review the summary to see which APIs were called
# Inspect the recorded requests
cat recordings/save-for-later_*.json | jq '.requests[] | select(.type == "request") | .data.url'
# Find specific API calls (adjust domain based on summary output)
cat recordings/save-for-later_*.json | jq '.requests[] | select(.data.url | contains("edgeapi"))'
# Extract POST data from API calls
cat recordings/save-for-later_*.json | jq '.requests[] | select(.type == "request" and .data.method == "POST") | {url: .data.url, data: .data.post_data}'The credentials are saved in shell format for use with curl:
source ~/.config/slacker/credentials
curl -H "Authorization: Bearer $SLACK_TOKEN" \
-H "Cookie: d=$SLACK_COOKIE" \
https://slack.com/api/conversations.listFull Slack API docs: https://api.slack.com/methods
Use slacker discover to explore available methods, or browse the documentation online.
Common categories:
chat- Send and manage messagesconversations- Manage channels and groupsusers- User informationfiles- File uploads and managementsearch- Search messages and filesreactions- Emoji reactionspins- Pin messages
- src/slacker/ - Python package
- pyproject.toml - Project configuration
- ~/.config/slacker/credentials - Generated credentials file (default location)
- Credentials are saved to
~/.config/slacker/credentialsby default - File permissions are set to
0600(only you can read) - Credentials expire when you log out of Slack
- Use workspace apps with OAuth for production
uv sync
uv run playwright install chromiumcurl -LsSf https://astral.sh/uv/install.sh | shMake sure you're fully logged in to Slack before pressing Enter in the terminal.
Manual extraction from browser DevTools:
- Open Slack, press F12
- Console tab:
JSON.parse(localStorage.getItem('localConfig_v2')).teams- copy token - Application/Storage tab β Cookies β find
dcookie - copy value - Export both:
export SLACK_TOKEN="xoxc-..." SLACK_COOKIE="xoxd-..."