How to Send a Direct Slack Message with Node
How To Send A Direct Slack Message With Node - Level Up Coding
This post assumes you have a Slack App set up and a basic working knowledge of Slack and Node.Our goal here is to get a direct message from our bot to a user. This message should appear in the bots direct message channel and not in the Slackbot channel. Assuming the app is called consoledotlog our end result should look like this.Go to your app on Slack. On the left side of the page find Features => OAuth & Permissions.Under Scopes, enable chat:write.Save and then scroll to the top of the page. Press Reinstall App. Once the app is reinstalled copy your OAuth token.Last we need the client signing secret, which can be found on your apps Basic Information page.