Send direct message without being contacted / mentioned first
paulosuzart opened this issue · 1 comments
paulosuzart commented
Hi,
I'm trying to implement a use case where a direct mensage will be sent to a user with no previous interaction between the target user and the bot. Is there any way to do that?
brianleroux commented
Hey @paulosuzart --it depends. If you have permissions granted via Add to Slack
button you might have the scopes to do that but you'd have to list all users and that could be considered spammy behavior. Once you know the user_id
You'll need to use api methods im.open
and chat.postMessage
to send a dm. The API is a little weird this way. LMK if this helps! 💯