Slack configuration
Package:sanvex/slack · Driver id: slack
Auth modes
What to register (Slack)
Bot token (recommended)
- api.slack.com/apps → Create New App.
- OAuth & Permissions → add Bot Token Scopes (
chat:write,channels:read, etc.). - Install to Workspace → copy Bot User OAuth Token (
xoxb-...). php artisan sanvex:setup slack --bot-token="xoxb-...".
User token
Use a user token (xoxp-...) with sanvex:setup slack --api-key="xoxp-..." when you need user-context API calls.
OAuth2 (multi-workspace installs)
- Same Slack app → OAuth & Permissions.
- Add Redirect URLs matching
SLACK_REDIRECT_URI. - Copy Client ID and Client Secret from Basic Information.
- Implement OAuth in your app; store tokens with
SlackKeyBuilder::setOAuthCredentials().
Environment variables
Bot/user tokens belong in
sv_accounts via CLI, not in .env.
config/sanvex.php (optional)
Optional — not read by the driver today.
Stored credential keys (sv_accounts)
Runtime token order:
bot_token → api_key → access_token.
CLI
Built-in Sanvex OAuth routes
None.What the driver reads at runtime
Next: Setup · Resources
