Some times we need to send a message to slack and this api will send a message for you!
So, in order to use this api there are a few requirements.
- You must send the Content-Type header as
application/vnd.api+json
, because this api follows the JSON API spec - For every request you must also send an additional header called
slack-bot-token
which is the Bot User OAuth Access Token given with a slack app under "OAth & Permissions"
There are only 2 endpoints
GET /
is just a friendly message Status:200
{
"data": {
message: 'Welcome to the slack api microservice.'
}
}
POST /
which is basically just a wrapper around slack's chat.postMessage endpoint Status:200
{
"data": {...slackresponse}
}