slack Interface operation

1. create a new app

https://api.slack.com/apps?new_app=1

2. Add a Bot User

You can bundle a bot user with your app to interact with users in a more conversational manner.

  • Set button 'Always Show My Bot as Online' to on

click the Add Bot User button and then Save Changes.

3. Setting up the Events API (Communication can also be achieved without this operation)

The Events API is a bot's equivalent of eyes and ears. It gives a bot a way to react to posted messages, changes to channels, and other activities that happen in Slack. When these events happen, a data payload will be sent to your bot, and it can use that data to form a useful response. 

  • click the Event Subscriptions feature & Switch the Enable Events toggle to on 
  • configure the Request URL

Events API

 ref: https://github.com/nlopes/slack/blob/master/examples/eventsapi/events.go

posted @ 2019-07-19 13:51  GuoXinxin  阅读(128)  评论(0编辑  收藏  举报