Can we send message to user in slack using python script?

Yes,this can be done. Instead of “#channel_name” use “@user” in the API. The user will receive the message from slackbot as we are using API and not a direct message from any other user. And if you want to post to that user as the authenticated user, use as_user= true.

slack.chat.post_message('@to_user',msg,username="@from_user")

More details are at https://api.slack.com/methods/chat.postMessage

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)