mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-22 00:54:19 +01:00
Fix markdownlint issues
This commit is contained in:
@@ -9,7 +9,7 @@ At the moment, the following functionality is exposed via REST:
|
|||||||
- Send message (+ attachments) to multiple recipients (or a group)
|
- Send message (+ attachments) to multiple recipients (or a group)
|
||||||
- Receive messages
|
- Receive messages
|
||||||
- Link devices
|
- Link devices
|
||||||
- Create/Liste/Remove groups
|
- Create/List/Remove groups
|
||||||
- List/Serve/Delete attachments
|
- List/Serve/Delete attachments
|
||||||
- Update profile
|
- Update profile
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ At the moment, the following functionality is exposed via REST:
|
|||||||
|
|
||||||
Sample `docker-compose.yml`file:
|
Sample `docker-compose.yml`file:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
signal-cli-rest-api:
|
signal-cli-rest-api:
|
||||||
@@ -31,5 +31,4 @@ services:
|
|||||||
|
|
||||||
The Swagger API documentation can be found [here](https://bbernhard.github.io/signal-cli-rest-api/). If you prefer a simple text file like API documentation have a look [here](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md)
|
The Swagger API documentation can be found [here](https://bbernhard.github.io/signal-cli-rest-api/). If you prefer a simple text file like API documentation have a look [here](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md)
|
||||||
|
|
||||||
|
In case you need more functionality, please **file a ticket** or **create a PR**.
|
||||||
In case you need more functionality, please **file a ticket** or **create a PR**
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
# Sample REST API calls:
|
# Sample REST API calls
|
||||||
|
|
||||||
- Register a number (with SMS verification)
|
- Register a number (with SMS verification)
|
||||||
|
|
||||||
@@ -99,6 +99,4 @@ e.g:
|
|||||||
|
|
||||||
The following REST API endpoints are **deprecated and no longer maintained!**
|
The following REST API endpoints are **deprecated and no longer maintained!**
|
||||||
|
|
||||||
|
|
||||||
`/v1/send`
|
`/v1/send`
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
# README
|
# README
|
||||||
|
|
||||||
This document describes how to use the Signal Messenger REST API together with Home Assistant.
|
This document describes how to use the Signal Messenger REST API together with Home Assistant.
|
||||||
|
|
||||||
prerequisites:
|
prerequisites:
|
||||||
|
|
||||||
* docker + docker-compose
|
* docker + docker-compose
|
||||||
|
|
||||||
-or-
|
-or-
|
||||||
|
|
||||||
* ability to install Home Assistant add-ons
|
* ability to install Home Assistant add-ons
|
||||||
|
|
||||||
* a phone number to send signal notifications
|
* a phone number to send signal notifications
|
||||||
|
|
||||||
## Set up the docker container
|
## Set up the docker container
|
||||||
|
|
||||||
* Create a `docker-compose.yml` file with the following contents:
|
* Create a `docker-compose.yml` file with the following contents:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
signal-cli-rest-api:
|
signal-cli-rest-api:
|
||||||
@@ -31,42 +33,40 @@ services:
|
|||||||
|
|
||||||
Add this repository to your Home Assistant Add-on Store reposity list:
|
Add this repository to your Home Assistant Add-on Store reposity list:
|
||||||
|
|
||||||
https://github.com/haberda/hassio_addons
|
[https://github.com/haberda/hassio_addons](https://github.com/haberda/hassio_addons)
|
||||||
|
|
||||||
Then install and start the add-on.
|
Then install and start the add-on.
|
||||||
|
|
||||||
## Register phone number
|
## Register phone number
|
||||||
|
|
||||||
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
|
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
|
||||||
|
|
||||||
|
`curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'`
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'```
|
|
||||||
|
|
||||||
e.g:
|
|
||||||
|
|
||||||
This registers the number `+431212131491291` to the Signal network.
|
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'```
|
|
||||||
|
|
||||||
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
|
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'```
|
|
||||||
|
|
||||||
e.g:
|
e.g:
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'```
|
This registers the number `+431212131491291` to the Signal network.
|
||||||
|
|
||||||
|
`curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'`
|
||||||
|
|
||||||
|
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
|
||||||
|
|
||||||
|
`curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'`
|
||||||
|
|
||||||
|
e.g:
|
||||||
|
|
||||||
|
`curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'`
|
||||||
|
|
||||||
## Sending messages to Signal Messenger groups
|
## Sending messages to Signal Messenger groups
|
||||||
|
|
||||||
The `signal-cli-rest-api` docker container is also capable of sending messages to a Signal Messenger group.
|
The `signal-cli-rest-api` docker container is also capable of sending messages to a Signal Messenger group.
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
|
|
||||||
* Home Assistant Version >= 0.110
|
* Home Assistant Version >= 0.110
|
||||||
* signal-cli-rest-api build-nr >= 2
|
* signal-cli-rest-api build-nr >= 2
|
||||||
The build number can be checked with: `curl -X GET -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/about'`
|
The build number can be checked with: `curl -X GET -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/about'`
|
||||||
* your phone number needs to be properly registered (see the "Register phone number" section above on how to do that)
|
* your phone number needs to be properly registered (see the "Register phone number" section above on how to do that)
|
||||||
|
|
||||||
A new Signal Messenger group can be created with the following REST API request:
|
A new Signal Messenger group can be created with the following REST API request:
|
||||||
|
|
||||||
@@ -78,11 +78,12 @@ This creates a new Signal Messenger group called `my group` with the members `+4
|
|||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" -d '{"name": "my group", "members": ["+4354546464654", "+4912812812121"]}' 'http://127.0.0.1:8080/v1/groups/+431212131491291'```
|
```curl -X POST -H "Content-Type: application/json" -d '{"name": "my group", "members": ["+4354546464654", "+4912812812121"]}' 'http://127.0.0.1:8080/v1/groups/+431212131491291'```
|
||||||
|
|
||||||
Next, use the following endpoint to obtain the group id:
|
Next, use the following endpoint to obtain the group id:
|
||||||
|
|
||||||
```curl -X GET -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/groups/<number>'```
|
```curl -X GET -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/groups/<number>'```
|
||||||
|
|
||||||
The group id then needs to be added to the Signal Messenger's `recipients` list in the `configuration.yaml`. (see [here](https://www.home-assistant.io/integrations/signal_messenger/) for details)
|
The group id then needs to be added to the Signal Messenger's `recipients` list in the `configuration.yaml`. (see [here](https://www.home-assistant.io/integrations/signal_messenger/) for details)
|
||||||
|
|
||||||
# Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)
|
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
# README
|
# README
|
||||||
|
|
||||||
This document describes how to use the Signal Messenger REST API together with Octoprint.
|
This document describes how to use the Signal Messenger REST API together with Octoprint.
|
||||||
|
|
||||||
prerequisites:
|
prerequisites:
|
||||||
|
|
||||||
* docker + docker-compose
|
* docker + docker-compose
|
||||||
* a phone number to send signal notifications
|
* a phone number to send signal notifications
|
||||||
|
|
||||||
## Set up the docker container
|
## Set up the docker container
|
||||||
|
|
||||||
* Create a `docker-compose.yml` file with the following contents:
|
* Create a `docker-compose.yml` file with the following contents:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
signal-cli-rest-api:
|
signal-cli-rest-api:
|
||||||
@@ -23,21 +24,19 @@ services:
|
|||||||
|
|
||||||
* start the docker container with `docker-compose up`
|
* start the docker container with `docker-compose up`
|
||||||
|
|
||||||
|
|
||||||
## Register phone number
|
## Register phone number
|
||||||
|
|
||||||
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
|
In order to send signal messages to other users, you first need to register your phone number. This can be done via REST requests with:
|
||||||
|
|
||||||
|
`curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'`
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>'```
|
e.g:
|
||||||
|
|
||||||
e.g:
|
|
||||||
|
|
||||||
This registers the number `+431212131491291` to the Signal network.
|
This registers the number `+431212131491291` to the Signal network.
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'```
|
`curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291'`
|
||||||
|
|
||||||
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
|
After you've sent the registration request, you will receive a token via SMS for verfication. In order to complete the registration process you need to send the verification token back via the following REST request:
|
||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'```
|
```curl -X POST -H "Content-Type: application/json" 'http://<ip>:<port>/v1/register/<number>/verify/<verification code>'```
|
||||||
|
|
||||||
@@ -45,6 +44,6 @@ e.g:
|
|||||||
|
|
||||||
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'```
|
```curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
# Troubleshooting
|
|
||||||
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)
|
In case you've problems with the `signal-cli-rest-api` container, have a look [here](TROUBLESHOOTING.md)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
## The signal-cli-rest-api docker container won't start (signal_messenger_signal-cli-rest-api_1 exited with code 0)
|
# The signal-cli-rest-api docker container won't start (signal_messenger_signal-cli-rest-api_1 exited with code 0)
|
||||||
|
|
||||||
If your docker container stops with `signal_messenger_signal-cli-rest-api_1 exited with code 0`, make sure that the host port isn't already occupied by another process (see [here](https://github.com/bbernhard/signal-cli-rest-api/issues/2)).
|
If your docker container stops with `signal_messenger_signal-cli-rest-api_1 exited with code 0`, make sure that the host port isn't already occupied by another process (see [here](https://github.com/bbernhard/signal-cli-rest-api/issues/2)).
|
||||||
|
|||||||
Reference in New Issue
Block a user