Matrix
| Schemes | matrix://, matrixs:// |
| Cargo feature | service-matrix |
| Service | https://matrix.org/ |
| Body formats | text, html, markdown (first is the default) |
| Attachments | yes |
| Title length | 250 characters |
| Body length | 65,000 characters |
| Body lines | unlimited |
| Request throttle | 500 ms between requests |
| Vendor URLs accepted | yes |
URL formats
{schema}://{token}
{schema}://{user}@{token}
{schema}://{user}:{password}@{host}/{targets}
{schema}://{user}:{password}@{host}:{port}/{targets}
{schema}://{token}@{host}/{targets}
{schema}://{token}@{host}:{port}/{targets}
{schema}://{user}:{token}@{host}/{targets}
{schema}://{user}:{token}@{host}:{port}/{targets}
{schema} is one of matrix://, matrixs://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{host} | Hostname | string | yes | ||
{password} | Password | string | no | secret | |
{port} | Port | int, 1 to 65535 | no | ||
{target_room_alias} | Target Room Alias | string | no | prefix # | |
{target_room_id} | Target Room ID | string | no | prefix ! | |
{target_user} | Target User | string | no | prefix @ | |
{targets} | Targets | list | no | any of target_room_alias, target_room_id, target_user; separated by / | |
{token} | Access Token | string | yes | secret | |
{user} | Username | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
autoverify | Automatic Device Verification | bool | no | |
discovery | Server Discovery | bool | yes | |
e2ee | End-to-End Encryption | bool | yes | |
hsreq | Force Home Server on Room IDs | bool | yes | |
image | Include Image | bool | no | |
mode | Webhook Mode | choice | off (usually; depends on the URL) | one of off, matrix, slack, t2bot, hookshot |
msgtype | Message Type | choice | text | one of text, notice |
path | Webhook Path | string | /webhook | |
to | Targets | list | sets {targets} | |
token | Access Token | string | sets {token} | |
version | Matrix API Version | choice | 3 | also v; one of 2, 3 |
keystore | Key store directory | string | keeps this URL’s state under the directory |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
matrix://user:pass@localhost
matrix://user:pass@localhost/!room:localhost
matrix://user:pass@localhost/!r1:localhost/!r2:localhost
matrixs://cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
https://webhooks.t2bot.io/api/v1/matrix/hook/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/
matrix://user:pass@localhost/!room:localhost?v=2
matrixs://user:pass@localhost/!room:localhost?e2ee=no
matrix://user:pass@localhost/!room?hsreq=no
Rejected URLs:
matrix://
matrixs://
matrix://localhost
matrix://user:token@localhost:123/#general/?v=invalid
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'matrix://user:pass@localhost'
Notes
Attachment encryption (Matrix EncryptedFile v2, AES-256-CTR).