Reputation: 1080
I'm working on a Slack application and I need to listen for new messages across channels.
According to the (awful) Slack documentation, I need to use the Events API: https://api.slack.com/events-api
And the scope I need to listen for channels messages is channels:history
I'm developing the application locally, so ngrock is being used to expose my endpoint to Slack.
So far I can listen to direct messages, so I assume I'm using the Events API correctly. The problem is only when I want to listen for new messages in channels, I've added the correct scope to the application and the bot is added to the channel, but still, no event is sent to my endpoint.
Upvotes: 7
Views: 2417
Reputation: 1080
I found the solution to my problem. I forgot to subscribe the app to bot events. I've only added the scopes to the bot.
Subscribing the app to bot events solved the problem.
Upvotes: 7
Reputation: 1851
You need to invite the bot to the channels you want to listen messages for.
Upvotes: 4