| 1 |
# Signal |
| 2 |
|
| 3 |
## URL Format |
| 4 |
|
| 5 |
!!! Info "" |
| 6 |
signal://[__`user`__[:__`password`__]@]__`host`__[:__`port`__]/__`source_phone`__/__`recipient1`__[,__`recipient2`__,...] |
| 7 |
|
| 8 |
--8<-- "docs/services/chat/signal/config.md" |
| 9 |
|
| 10 |
!!! Note "Authentication Priority" |
| 11 |
If both token and user/password are provided, the API token takes precedence and uses Bearer authentication. |
| 12 |
This is useful for [secured-signal-api](https://github.com/codeshelldev/secured-signal-api) which prefers Bearer tokens. |
| 13 |
|
| 14 |
## Setting up Signal API Server |
| 15 |
|
| 16 |
Signal notifications require a Signal API server that can send messages on behalf of a registered Signal account. These implementations are built on top of __[signal-cli](https://github.com/AsamK/signal-cli)__, the unofficial command-line interface for Signal. |
| 17 |
|
| 18 |
Popular open-source implementations include: |
| 19 |
|
| 20 |
- __[signal-cli-rest-api](https://github.com/bbernhard/signal-cli-rest-api)__: Dockerized REST API wrapper for signal-cli |
| 21 |
- __[secured-signal-api](https://github.com/codeshelldev/secured-signal-api)__: Security proxy for signal-cli-rest-api with authentication and access control |
| 22 |
|
| 23 |
Common setup involves: |
| 24 |
|
| 25 |
1. __Phone Number__: A dedicated phone number registered with Signal |
| 26 |
2. __API Server__: A server running signal-cli with REST API capabilities |
| 27 |
3. __Account Linking__: Linking the server as a secondary device to your Signal account |
| 28 |
4. __Optional Security Layer__: Authentication and endpoint restrictions via a proxy |
| 29 |
|
| 30 |
The server must be able to receive SMS verification codes during initial setup and maintain a persistent connection to Signal's servers. |
| 31 |
|
| 32 |
!!! Note "Setup Resources" |
| 33 |
See the [signal-cli-rest-api documentation](https://github.com/bbernhard/signal-cli-rest-api) and [secured-signal-api documentation](https://github.com/codeshelldev/secured-signal-api) for detailed setup instructions. |
| 34 |
|
| 35 |
## Recipients |
| 36 |
|
| 37 |
Recipients can be: |
| 38 |
|
| 39 |
- __Phone numbers__: With country code (e.g., +0987654321) |
| 40 |
- __Group IDs__: In the format `group.groupId` |
| 41 |
- __Usernames__: In the format `u:nickname.123` |
| 42 |
|
| 43 |
!!! Important |
| 44 |
The Signal API rejects mixed recipient types in a single `/v2/send` request. |
| 45 |
Shoutrrr splits them: all phone numbers go in one request, all usernames in another, and each group in its own request. |
| 46 |
A URL that lists phones and a group therefore results in more than one POST. |
| 47 |
If any of those requests fail, the others may already have been sent. |
| 48 |
|
| 49 |
## TLS Configuration |
| 50 |
|
| 51 |
- Use `signal://` for HTTPS (default, recommended) |
| 52 |
- Use `signal://...?disabletls=yes` for HTTP (insecure, for local testing only) |
| 53 |
- Use `skiptlsverify=yes` to skip certificate-chain trust and hostname validation (expired, untrusted, and hostname-mismatched certificates). TLS 1.2 remains the minimum. |
| 54 |
|
| 55 |
## Examples |
| 56 |
|
| 57 |
### Send to a single phone number |
| 58 |
|
| 59 |
``` |
| 60 |
signal://localhost:8080/+1234567890/+0987654321 |
| 61 |
``` |
| 62 |
|
| 63 |
### Send to multiple recipients |
| 64 |
|
| 65 |
``` |
| 66 |
signal://localhost:8080/+1234567890/+0987654321/+1123456789/group.testgroup |
| 67 |
``` |
| 68 |
|
| 69 |
The two phone numbers are sent together. The group is a second `/v2/send` call. |
| 70 |
|
| 71 |
### Send to a group |
| 72 |
|
| 73 |
``` |
| 74 |
signal://localhost:8080/+1234567890/group.abcdefghijklmnop= |
| 75 |
``` |
| 76 |
|
| 77 |
### With authentication |
| 78 |
|
| 79 |
``` |
| 80 |
signal://user:password@localhost:8080/+1234567890/+0987654321 |
| 81 |
``` |
| 82 |
|
| 83 |
### With API token (Bearer auth) |
| 84 |
|
| 85 |
``` |
| 86 |
signal://localhost:8080/+1234567890/+0987654321?token=YOUR_API_TOKEN |
| 87 |
``` |
| 88 |
|
| 89 |
### Send to a username |
| 90 |
|
| 91 |
``` |
| 92 |
signal://localhost:8080/+1234567890/u:someuser.123 |
| 93 |
``` |
| 94 |
|
| 95 |
### Using HTTP instead of HTTPS |
| 96 |
|
| 97 |
``` |
| 98 |
signal://localhost:8080/+1234567890/+0987654321?disabletls=yes |
| 99 |
``` |
| 100 |
|
| 101 |
### Styled message |
| 102 |
|
| 103 |
``` |
| 104 |
signal://localhost:8080/+1234567890/+0987654321?textmode=styled |
| 105 |
``` |
| 106 |
|
| 107 |
!!! Note |
| 108 |
- When `textmode=styled`, the message body may include `*italic*`, `**bold**`, `~strikethrough~`, `||spoiler||`, and `` `monospace` ``. |
| 109 |
- Escape a formatting character with two backslashes. |
| 110 |
- If `textmode` is omitted, the JSON `text_mode` field is omitted and the API server default applies. |
| 111 |
|
| 112 |
### Title |
| 113 |
|
| 114 |
Signal has no separate title field. |
| 115 |
A non-empty `title` (URL query, or the send `title` param) is prepended as the first line of the message. |
| 116 |
With `textmode=styled` the title is wrapped in `**...**`. |
| 117 |
|
| 118 |
``` |
| 119 |
signal://localhost:8080/+1234567890/+0987654321?title=Alert&textmode=styled |
| 120 |
``` |
| 121 |
|
| 122 |
## Attachments |
| 123 |
|
| 124 |
Use the `attachments` query parameter or send param with comma-separated raw base64 values. |
| 125 |
If the value contains `data:`, it is sent as a single data URI (data URIs contain commas, so they are not split). |
| 126 |
|
| 127 |
``` |
| 128 |
signal://localhost:8080/+1234567890/+0987654321?attachments=base64data1,base64data2 |
| 129 |
``` |
| 130 |
|
| 131 |
!!! Note "Attachment Format" |
| 132 |
Raw base64 entries may be comma-separated. |
| 133 |
A `data:` URI must be sent as a single value. |
| 134 |
|
| 135 |
## Implementation Notes |
| 136 |
|
| 137 |
Shoutrrr's Signal service sends messages using POST requests to the Signal API server's `/v2/send` endpoint. |
| 138 |
Requests use HTTPS by default and HTTP only when TLS is disabled. |
| 139 |
The JSON payload contains the message, source number, recipient list, and optional `text_mode`, `notify_self`, and `base64_attachments`. |
| 140 |
The API server handles the actual Signal protocol communication. |