slack
slack copied to clipboard
Clarify in the docs and examples that a bot token is not required for the socketmode apiClient
Description
The examples and documentation always provide an apiClient
which has been initialized with a valid bot token. However, this client is only ever used to start a socket connection with StartSocketModeContext
which only uses the app level token.
Apps that work with multiple workspaces (and therefore multiple bot tokens) cannot provide a single bot token. Instead, providing an empty string for the bot token in the apiClient works fine.
The example here: https://github.com/xNok/slack-go-demo-socketmode/blob/b593fc4451b1580b68f2fae3b14d0b3d98a04fad/drivers/slack.go#L24 should probably have all mentions of a bot token removed.
And possibly function doc here: https://github.com/slack-go/slack/blob/master/socketmode/socketmode.go#L105
Thanks for the library!