Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bark

Schemesbark://, barks://
Cargo featureservice-bark
Servicehttps://github.com/Finb/Bark
Body formatstext (first is the default)
Attachmentsno
Title length250 characters
Body length32,768 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

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

TokenMeaningTypeRequiredDefaultNotes
{host}Hostnamestringyes
{password}Passwordstringnosecret
{port}Portint, 1 to 65535no
{target_device}Target Devicestringnosecret
{targets}Targetslistyessecret; any of target_device; separated by /
{user}Usernamestringno

Query parameters

ParameterMeaningTypeDefaultNotes
badgeBadgeint, min 0
callCallboolno
categoryCategorystring
clickClickstring
groupGroupstring
iconIcon URLstring
imageInclude Imageboolyes
keyEncryption Keystringsecret
levelLevelchoiceone of active, timeSensitive, passive, critical
soundSoundchoiceone 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)
toTargetslistsets {targets}
volumeVolumeint, 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.