0

I'm trying to send a message from a Plugin by calling directly to the bot

self._bot.sc.api_call('chat.postMessage', data={ 'channel': "#general", 'text': "test msg", 'unfurl_media': 'true', 'as_user': 'true', }) Always returns with: {'ok': False, 'error': 'channel_not_found'}

avivl
  • 407
  • 4
  • 4

2 Answers2

0

#general is your channel name, not your channel Id, so you should use channel Id, you can find your channel id here

chenkehxx
  • 1,589
  • 12
  • 15
0

Problem solved self._bot.sc.api_call( 'chat.postMessage', channel="#general", text="My message text here", unfurl_media='true', as_user='true', )

avivl
  • 407
  • 4
  • 4