'Can't send direct message to Slack bot, feature turned off

I created a Slack bot (app) and I'm not able to send direct messages to it even though I'm pretty sure I have all the permissions enabled.

The direct message window shows Sending messages to this app has been turned off. in the input field.

Sending messages to this app has been turned off.

Am I missing some permissions?

Permissions



Solution 1:[1]

Go to your App Settings page and go to App Home and set the checkbox for "Allow users to send Slash commands and messages from the messages tab" enter image description here

https://github.com/MicrosoftDocs/bot-docs/issues/2077#issuecomment-843960695

At the bottom you will see the option

enter image description here

Solution 2:[2]

Adding following scope worked for me:

1. mpim:write   -> Start group direct messages with people
2. im:write     -> Start direct messages with people

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mauricio Gracia Gutierrez
Solution 2 blazehub