Mastodon
| Schemes | mastodon://, toot://, mastodons://, toots:// |
| Cargo feature | service-mastodon |
| Service | https://joinmastodon.org |
| Body formats | text (first is the default) |
| Attachments | yes |
| Title length | no title (merged into the body) |
| Body length | 500 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
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
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{host} | Hostname | string | yes | ||
{port} | Port | int, 1 to 65535 | no | ||
{target_user} | Target User | string | no | prefix @ | |
{targets} | Targets | list | no | any of target_user; separated by / | |
{token} | Access Token | string | yes |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
batch | Batch Mode | bool | yes | |
key | Idempotency-Key | string | ||
language | Language Code | string | ||
ping | Ping Users/Tags | list | separated by , or space | |
sensitive | Sensitive Attachments | bool | no | |
spoiler | Spoiler Text | string | ||
to | Targets | list | sets {targets} | |
token | Access Token | string | sets {token} | |
visibility | Visibility | choice | default (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 readsX-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.