The goal of this application is to create a simple way to send message notifications to messaging platforms easy!
Install docker and docker-compose
- git clone git@github.com:codelittinc/notifications.git
- run: cp .env.example .env
- inside the project folder run
sh bin/dev
You are now in the docker console
- run:
bundle install
- run:
rails db:setup
- run the server: rails s -b`hostname -i`
- access the admin panel on your browser:
http://localhost:3000/admin
- Access
http://localhost:3000/admin/provider_credential/new
- Set the Access Key that you get from your Slack app
- Set the Team that you get from your Slack app
- Set the Application Key that you'll use to identify this provider. It will be used as an authentication key as well
- Set the name of your team (currently used for internal management only)
Listing the Slack users:
curl --location --request GET 'http://localhost:4000/users' --header 'Authorization: <APPLICATION_KEY>'
Sending messages:
curl --location --request POST 'http://localhost:4000/channel-messages'
--header 'Content-Type: application/json'
--header 'Authorization: <APPLICATION_KEY>'
--data-raw '{
"channel": "feed-test-automations",
"message": ":roadrunner: I'''m working!"
}'