I am building a Slack App which shows an ephemeral message to users if they use my custom slash command anywhere: direct messages, public channel or private channel.
It all works on public channels and private channels (where the bot is invited), but when a request comes from a direct message channel (user is typing something to another user in a direct message channel) I get an error: channel_not_found.
Am I missing any of app permissions or chat.postEphemeral doesn't work for direct messages channels?
In the documentation is information that chat.postEphemeral works in private conversation.
Here is the response from a direct message channel (user write to another user):
{
token: 'myValidToken',
team_id: 'TG8HU58EM',
team_domain: 'Test',
channel_id: 'DGE085TRH',
channel_name: 'directmessage',
user_id: 'UG1TR625J',
user_name: 'test.user',
command: '/my-command',
text: 'help',
response_url:
'https://hooks.slack.com/commands/TG8HU58EM/459862138745/VvhWfjkzqj41g21MZnQnJh8J',
trigger_id: '459862138745.76621584642.5dc0055d2dd61c155fd1cd1c163df5a5' }
The bot scopes: bot scopes