Slack WebHooks
What is a WebHook? We could define it as a method to make web pages reactive to user input based on a simple HTTP POST method to support a user-defined HTTP callback. Still a bit obscure, isn't it? Let's put it this way: Slack has some endpoints, sensitive URLs; and when you post something through HTTP to endpoints, you actually communicate with Slack. What makes these WebHook interesting is that they are stateless, since they do not rely on a continuously open connection to the service; and you just ping Slack whenever you need to post or retrieve some pieces of information. Slack supports two different kinds of WebHooks:
- Incoming WebHook: This is the URL that we will be to when we want some messages to appear on our test channel
- Outgoing WebHook: This is the URL that Slack uses to notify us of some events in a channel
We will be using the WebHook for our notification script. So, what will we need? We will need the following things:
- Slack incoming WebHook linked to one of...