Home > Blockchain >  Can a Slack bot use conversation.history method in a channel without joining the channel?
Can a Slack bot use conversation.history method in a channel without joining the channel?

Time:02-24

When I tried it with POSTMAN, it said NOT IN CHANNEL and gave me an error.

It is true that a bot that is not basically participating in a channel (treated no differently than a user) cannot get conversation contents of the channel, which is strange, so it may not be possible.

However, as mentioned in another Stack Over Flow question (Can a slack bot join automatically a channel?), there was a way to post a message without joining the channel. In the same way, is there a way to use conversation.history for that channel without joining it?

CodePudding user response:

Yes your bot needs to be in the channel when you call conversations.history. For posting messages there's a special scope a bot can have which will allow it to post into public channels without being added to them but the bot will still need to be added to private channels. There is no such scope for conversations.history unfortunately.

  • Related