{"id":20509046,"url":"https://github.com/abeluck/signal-hook","last_synced_at":"2026-06-06T19:31:06.176Z","repository":{"id":146550566,"uuid":"134250707","full_name":"abeluck/signal-hook","owner":"abeluck","description":"send Signal messages with HTTP POST","archived":false,"fork":false,"pushed_at":"2018-10-29T19:05:13.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T08:28:11.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abeluck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-21T09:54:57.000Z","updated_at":"2018-10-29T19:05:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"a86554c2-4087-4a9b-8687-c2de6febaff0","html_url":"https://github.com/abeluck/signal-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fsignal-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fsignal-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fsignal-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeluck%2Fsignal-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeluck","download_url":"https://codeload.github.com/abeluck/signal-hook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242112151,"owners_count":20073539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:22:02.572Z","updated_at":"2026-06-06T19:31:06.170Z","avatar_url":"https://github.com/abeluck.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# signal-hook\n\n\u003e Send Signal messages with an HTTP POST\n\n**WARNING: This project is under development. It doesn't do what you think it\ndoes. Don't use it.**\n\n![](signal-hook.png)\n\nsignal-hook provides a small (some might even say *micro*) service for sending messages to individuals and\ngroups on [Signal][signal] with [twilio-like payloads][twiliosms] via HTTP.\n\nsignal-hook uses [signal-cli][signal-cli] under the hood.\n\n## Prerequisites\n\n**WARNING: This project is under development. It doesn't do what you think it\ndoes. Don't use it.**\n\nThis project uses Clojure and you will need [Leiningen][lein] 2.0 or above\ninstalled to proceed. You'll also need JDK 8 or higher. If Docker is your\nthing, you can use that too.\n\n## Usage\n\n**WARNING: This project is under development. It doesn't do what you think it\ndoes. Don't use it.**\n\nPOST some JSON. Get a Message.\n\nhttpie:\n\n    http -a admin:changeme -v --json POST localhost:3000/send To:='\"+15558675309\"' Body=\"Hi J\"\n\ncurl:\n\n    curl -X POST -d '{\"Body\": \"Hi J\", \"To\": \"+15558675309\"}' -H \"Content-Type: application/json\" http://admin:changeme@localhost:3000/send\n\nAuth: The authentication story in signal-hook is pretty basic at the moment. You can\nsupply multiple username password pairs, which are authenticated using http\nbasic-auth. All authed users can send messages.\n\n\nHTTPS: **You should run signal-hook behind a HTTPS/TLS proxy**. I recommend\nfronting it with nginx + letsencrypt.\n\n### Quickstart\n\nBuilding is pretty easy if you have lein installed:\n\n    lein uberjar\n\nThis will create the self-contained jar file `target/uberjar/signal-hook.jar`.\n\nYou can execute it with java, like so:\n\n        java -jar target/uberjar/signal-hook.jar -Dconf=prod-config.edn\n\nHowever you will need some configuration to make the whole thing work, that's the `prod-config.edn` bit.\n\nCopy the sample file `prod-config.sample.edn` and edit it, supplying your own values.\n\nOr, you can inject the configuration with environment variables:\n\n```\nSIGNAL_CLI__PATH=/local/path/to/signal-cli\nSIGNAL_CLI__STATE_DIR=/home/\u003cyour username\u003e/.config/signal\nSIGNAL_CLI__USERNAME=+611234561234\nAPI_CREDS='{:admin \"changeme\"}' \n```\n\nYou'll need to install [signal-cli][signal-cli] yourself manually and tweak the config as appropriate.\n\n### Docker. Docker. Docker.\n\n#### Docker build\n\nPretty simple:\n\n    lein uberjar\n    docker build -t signal-hook .\n\n#### Docker run\n\n1. Create a persistent docker volume to store signal-cli's state\n\n        sudo docker volume create v-signal-hook\n\n2. Start the container\n\n        sudo docker run -d --name signaltest -p 3000:3000 \\\n                        -e API_CREDS='{:admin \"changeme\"}' \\\n                        -e SIGNAL_CLI__USERNAME='\"+1234567890\"' \n                        -v v-signal-hook:/var/lib/signal-cli \\\n                        signal-hook\n\n    Substitute in the phone number that will be sending (aka the From party) the messages. Also substitute in the user name and password you want to protect the service: `{:admin \"changeme\"}`.\n\n3. Link signal-hook to your existing Signal number\n\n        sudo docker exec -it signaltest \\\n               /usr/local/bin/signal-cli --config /var/lib/signal-cli link --name signal-test-device\n\n    Change `signal-test-device` to any other name, it will show up in Signal under \"Linked Devices\"\n\n\n### API Format\n\nThe expected webhook payload is similar to [twilio's send messages\napi][twiliosms].\n\nTo send an outgoing message, make an HTTP POST to the `https://your.signal-webhook.url/send` endpoint.\n\n| Parameter | Description                                                                                                                       | Example                             |\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|\n| To        | The recipient's phone number or group id, or an array of multiple numbers and group ids. Group ids must be prefixed with `group:` | `[ \"+15558675309\", \"group:XXX==\" ]` |\n| Body      | The text of the message you want to send. Maximum size XXXX bytes.                                                                | Hello World!                        |\n| MediaUrl  | A URL to image to send as an attachment                                                                                           | https://example.com/someimage.jpg   |\n\n\n\u003c!-- table made with https://www.tablesgenerator.com/markdown_tables --\u003e\n\nThe `To` parameter is **required** in your POST to send the message. And **at\nleast one** of `Body` or `MediaUrl` is required.\n\n#### Examples of valid payloads:\n\n```json\n{\n    \"Body\": \"Send message to a single group\", \n    \"To\": \"group:aaaaaaaaa==\"\n}\n```\n\n```json\n{\n    \"Body\": \"Send message to a single individual\", \n    \"To\": \"+341234567890\"\n}\n```\n\n```json\n{\n    \"Body\": \"Send message to multiple mixed recipients\", \n    \"To\": [\"+4912345678\", \"group:aaaaaaaaa==\"]\n}\n```\n\n## Development\n\nTo start a web server for the application, run:\n\n    lein run \n\nTo run tests, refreshing automatically\n\n    lein test-refresh\n\n## License\n\nCopyright © 2018 Abel Luck \u003cabel@guardianproject.info\u003e\n\nDistributed under the AGPL v3 license. See [LICENSE.md](LICENSE.md) for more information.\n\nProject generated using Luminus version \"2.9.12.42\"\n\n\n[signal]: https://signal.org\n[twiliosms]: https://www.twilio.com/docs/sms/send-messages\n[signal-cli]: https://github.com/AsamK/signal-cli\n[lein]: https://leiningen.org/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fsignal-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeluck%2Fsignal-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeluck%2Fsignal-hook/lists"}