Plivo hook to receive SMS messages and send them to a Slack channel.
docker run -d nl2go/plivo-sms-slack-hook \
-e PLIVO_SMS_SLACK_HOOK_WEBHOOK_URL=https://hooks.slack.com/services/foo-bar \
-e PLIVO_SMS_SLACK_HOOK_TARGET_NUMBER=123123123 \
-p 8080:8080
A message may be sent using /messages
endpoint.
curl \
--request POST 'http://localhost:8080/messages?From=123&To=1&Text=HelloWorld' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode '='
Configuration is supported through environment variables.
Name | Description |
---|---|
PLIVO_SMS_SLACK_HOOK_WEBHOOK_URL |
Slack incoming webhook URL. |
PLIVO_SMS_SLACK_HOOK_MESSAGE_TEMPLATE |
Slack webhook message template. |
PLIVO_SMS_SLACK_HOOK_TARGET_NUMBER |
Plivo managed phone number that is capable of receiving the SMS. Used as authorization verification. |
Defaults may be found within application.yml.
- OpenJDK 11
- Docker >=17.x
- Docker Compose >=2.3
$ mvn clean package
$ docker-compose up -d
See the LICENSE.md file for details