Registering a new Slack app

In order to connect up our intended service to Slack, we need to register a bot app.

An app is a construct in Slack whereby you can extend its standard functionality and incorporate your own logic.

To register an app, we need to use the developer console that Slack provides. We're doing this so that we can set up triggers within our Slack group that will create events for our bot to respond to. Let's get started:

  1. Head over to https://api.slack.com/ and create a new app. If you're new to Slack, you will need to create a workspace first. I've created a bot called ConfigBot that will be used to query for configuration items in the AWS accounts that our fake team manages.
  2. After creating our first app, we need to add a bot user. This will generate some credentials for our service so that it can authenticate users. Take note of these because we will need them later.
  3. Next, we need to install the app into our Slack workspace; you can find the Install button on the dashboard of the app page. Take note of the Bot User OAuth Access Token value because we'll need that later as well.
  1. Finally, we need to add an event that this app is subscribed to. We are going to choose app_mention event so that our app can respond accordingly. Here's where you can find the event subscription settings:

Adding an event subscription to our bot app in the Slack API console (https://api.slack.com)

That's all for now. We'll come back to these settings to complete the setup process after we've created our bot service in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.226.109