Bark
| Schemes | bark://, barks:// |
| Cargo feature | service-bark |
| Service | https://github.com/Finb/Bark |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{host}/{targets}
{schema}://{host}:{port}/{targets}
{schema}://{user}:{password}@{host}/{targets}
{schema}://{user}:{password}@{host}:{port}/{targets}
{schema} is one of bark://, barks://.
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_device} | Target Device | string | no | secret | |
{targets} | Targets | list | yes | secret; any of target_device; separated by / | |
{user} | Username | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
badge | Badge | int, min 0 | ||
call | Call | bool | no | |
category | Category | string | ||
click | Click | string | ||
group | Group | string | ||
icon | Icon URL | string | ||
image | Include Image | bool | yes | |
key | Encryption Key | string | secret | |
level | Level | choice | one of active, timeSensitive, passive, critical | |
sound | Sound | choice | one of alarm.caf, anticipate.caf, bell.caf, birdsong.caf, bloom.caf, calypso.caf, chime.caf, choo.caf, descent.caf, electronic.caf, fanfare.caf, glass.caf, … (32 values) | |
to | Targets | list | sets {targets} | |
volume | Volume | int, 0 to 10 |
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):
barks://192.168.0.7/device_key/
bark://192.168.0.6:8081/device_key
bark://user@192.168.0.6:8081/device_key
bark://192.168.0.6:8081/device_key/?image=no
bark://192.168.0.6:8081/device_key/?volume=-1
bark://192.168.0.6:8081/device_key/?sound=invalid
bark://192.168.0.6:8081/device_key/?level=invalid
barks://192.168.0.6:8081/device_key/?badge=invalid
Rejected URLs:
bark://
bark://:@/
bark://192.168.0.6:8081/device_key/?key=short
bark://192.168.0.6:8081/device_key/?key=%C3%A90123456789abcd
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'barks://192.168.0.7/device_key/'
Notes
Bark (bark://, barks://): push notifications to the Bark iOS app through a Bark server.
With ?key= every payload is encrypted with AES-GCM (16, 24 or 32 byte ASCII key, fresh 12 character IV per request) the way the Bark app expects.