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

Mastodon

Schemesmastodon://, toot://, mastodons://, toots://
Cargo featureservice-mastodon
Servicehttps://joinmastodon.org
Body formatstext (first is the default)
Attachmentsyes
Title lengthno title (merged into the body)
Body length500 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

{schema}://{token}@{host}
{schema}://{token}@{host}:{port}
{schema}://{token}@{host}/{targets}
{schema}://{token}@{host}:{port}/{targets}

{schema} is one of mastodon://, toot://, mastodons://, toots://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{host}Hostnamestringyes
{port}Portint, 1 to 65535no
{target_user}Target Userstringnoprefix @
{targets}Targetslistnoany of target_user; separated by /
{token}Access Tokenstringyes

Query parameters

ParameterMeaningTypeDefaultNotes
batchBatch Modeboolyes
keyIdempotency-Keystring
languageLanguage Codestring
pingPing Users/Tagslistseparated by , or space
sensitiveSensitive Attachmentsboolno
spoilerSpoiler Textstring
toTargetslistsets {targets}
tokenAccess Tokenstringsets {token}
visibilityVisibilitychoicedefault (usually; depends on the URL)one of default, direct, private, unlisted, public

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):

toot://access_token@hostname
toots://access_token@hostname
mastodon://access_token@hostname
mastodon://access_token@hostname/@user/@user2
mastodon://access_token@hostname/?batch=no
mastodon://hostname/@user/@user2?token=abcd123
mastodon://access_token@hostname?visibility=unl
mastodon://access_token@hostname?format=markdown

Rejected URLs:

mastodon://hostname
mastodon://access_token@hostname/-/%/
mastodon://access_token@hostname?visibility=invalid

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'toot://access_token@hostname'

Notes

Mastodon (mastodon://, toot://, mastodons://, toots://): posts statuses to a Mastodon instance.

Differences with Apprise

  • The rate-limit reset is read from X-RateLimit-Reset (an RFC 3339 time); Apprise reads X-RateLimit-Limit, a request count, so its back-off never waits. The budget is kept for the life of the URL, as in Apprise.
  • The account lookup of direct mode is kept for the life of the URL whatever ?cache= says, as in Apprise (whose _whoami() call ignores it).
  • In direct mode prepended targets keep their configured (sorted) order; Apprise iterates an unordered set.