1

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?

Hiroshi Nishio
  • 222
  • 4
  • 11

1 Answers1

2

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.

sandra
  • 1,301
  • 3
  • 3
  • Gosh, I knew it. I'm sorry to hear that, but I understand. Thank you for letting me know! – Hiroshi Nishio Feb 24 '22 at 13:34
  • However, if that is the case, creating an API with a bot token would still be inconvenient for users. So, in that case, it would be better to use a user token, right? – Hiroshi Nishio Feb 24 '22 at 13:38
  • 1
    It it's just public channels you want then yes a user token would probably work better. but for private channels the issue remains the same, the user would have to be in the channel. – sandra Feb 24 '22 at 17:20