Rocket.Chat
| Schemes | rocket://, rockets:// |
| Cargo feature | service-rocketchat |
| Service | https://rocket.chat/ |
| Body formats | markdown (first is the default) |
| Attachments | no |
| Title length | no title (merged into the body) |
| Body length | 1,000 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{user}:{password}@{host}:{port}/{targets}
{schema}://{user}:{password}@{host}/{targets}
{schema}://{user}:{token}@{host}:{port}/{targets}
{schema}://{user}:{token}@{host}/{targets}
{schema}://{webhook}@{host}
{schema}://{webhook}@{host}:{port}
{schema}://{webhook}@{host}/{targets}
{schema}://{webhook}@{host}:{port}/{targets}
{schema} is one of rocket://, rockets://.
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_channel} | Target Channel | string | no | prefix # | |
{target_room} | Target Room ID | string | no | ||
{target_user} | Target User | string | no | prefix @ | |
{targets} | Targets | list | no | any of target_channel, target_room, target_user; separated by / | |
{token} | API Token | string | no | secret | |
{user} | Username | string | no | ||
{webhook} | Webhook | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
avatar | Use Avatar | bool | no (usually; depends on the URL) | |
mode | Webhook Mode | choice | one of webhook, token, basic | |
to | Targets | list | sets {targets} | |
webhook | Webhook | string | sets {webhook} |
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):
rocket://user:pass@localhost/room
rockets://user:pass@localhost/#channel
rocket://user:pass@localhost:8080/room/
rockets://web/token@localhost/@user/#channel/roomid
rockets://user:tttttttttttttttttttttttttttttttttttttttt@localhost/#channel/@bob/room1
rockets://web/token@localhost/?avatar=No
rockets://user:token@localhost/#channel?mode=token
rocket://user:pass@localhost/#channel1/#channel2/?avatar=Yes
Rejected URLs:
rocket://
rockets://
rocket://:@/
rocket://localhost
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'rocket://user:pass@localhost/room'
Notes
Rocket.Chat (rocket://, rockets://): messages to Rocket.Chat channels and users.
Webhook URLs (rocket://[user:]abc/def@host) put a / inside the userinfo; the raw URL is rewritten and parsed again.