-3

Related to my assigned project, I wrote a bash script to implement the task.

For the user account and secret/hash creation part, the manager told me to find a way to send the user config file content directly to the individual user's slack(not a channel with a group of people in it). How to do that?.

I can see, search gives me the result of sending to slack channel using curl with short text messages.

I am not sure how to do the following:

  • Send a config file content to an individual user's slack.

Suppose, if the user account, password, hashes generated in the file /root/user_config. I want to send the file content to the individual user's slack(not channel or group).

vjwilson
  • 754
  • 2
  • 14
  • 30

1 Answers1

0

From purely Slack Conversations perspective,

You need to DM the user using following APIs :

  1. Open Conversation (Get DM Id):
    https://api.slack.com/methods/conversations.open

  2. Post Message using DM Id :
    https://api.slack.com/methods/chat.postMessage

What data you need to send is up to you.

Suyash Gaur
  • 2,481
  • 2
  • 9
  • 22