This guide walks you through setting up authentication for slk.
Read-Only Mode - For viewing and searching only (recommended for most users)
- List channels, messages, users
- Search messages
- View reactions, pins, files
- Can't send messages or modify anything
Full Access Mode - For automation and writing
- Everything from read-only mode
- Send, edit, delete messages
- Add/remove reactions
- Pin/unpin messages
- Upload files
- Join/leave channels
- Go to https://api.slack.com/apps
- Click "Create New App"
- Select "From an app manifest"
- Choose your workspace
- Select YAML tab
- Copy and paste the appropriate manifest:
- Read-Only:
slack-app-manifest-readonly.yaml - Full Access:
slack-app-manifest-full.yaml
- Read-Only:
- Click "Next" → Review → "Create"
- In your new app's settings, go to "OAuth & Permissions"
- Click "Install to Workspace"
- Review the permissions and click "Allow"
- After installation, you'll see "User OAuth Token" (starts with
xoxp-) - Copy this token
- Run
slk config initand paste the token when prompted
slk auth testYou should see your user info - you're all set!
If you prefer to configure scopes manually:
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Enter app name:
slk - Choose your workspace
- Click "Create App"
Go to "OAuth & Permissions" → "User Token Scopes" and add:
identify- Verify user identitychannels:read- List public channelschannels:history- Read public channel messagesgroups:read- List private channelsgroups:history- Read private channel messagesim:read- List DMsim:history- Read DMsmpim:read- List group DMsmpim:history- Read group DMssearch:read- Search messagesusers:read- List usersreactions:read- View reactionspins:read- View pinned messagesfiles:read- View filesemoji:read- List custom emoji
Add these additional scopes:
channels:write- Join/leave channelschat:write- Send/edit/delete messages as the authenticated userreactions:write- Add/remove reactionspins:write- Pin/unpin messagesfiles:write- Upload files
- Click "Install to Workspace"
- Review permissions and click "Allow"
- Copy the "User OAuth Token" (starts with
xoxp-)
slk config initPaste your token when prompted.
- Make sure you copied the User OAuth Token (not Bot Token)
- Token should start with
xoxp-
- Reinstall the app to your workspace after adding new scopes
- Check that all required scopes are added in OAuth & Permissions
- The CLI can only access channels where the user (you) has access
- Private channels require the user to be a member
- Your token is stored locally in
~/.config/slk/config.json - File permissions are set to
0600(owner read/write only) - Never commit your token to version control
- You can revoke the token anytime at https://api.slack.com/apps
Once configured, you can:
# List channels
slk channels list --human
# Get recent messages
slk messages list --channel "#general" --limit 10
# Search messages
slk messages search --query "error"
# Send a message
slk messages send --channel "#general" --text "Hello!"
# Add a reaction
slk reactions add --channel "#general" --ts "1234567890.123456" --emoji "thumbsup"
# And much more!
slk --help- See README.md for usage examples
- Check docs/DESIGN.md for complete API reference