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

Matrix

Schemesmatrix://, matrixs://
Cargo featureservice-matrix
Servicehttps://matrix.org/
Body formatstext, html, markdown (first is the default)
Attachmentsyes
Title length250 characters
Body length65,000 characters
Body linesunlimited
Request throttle500 ms between requests
Vendor URLs acceptedyes

URL formats

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

{schema} is one of matrix://, matrixs://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{host}Hostnamestringyes
{password}Passwordstringnosecret
{port}Portint, 1 to 65535no
{target_room_alias}Target Room Aliasstringnoprefix #
{target_room_id}Target Room IDstringnoprefix !
{target_user}Target Userstringnoprefix @
{targets}Targetslistnoany of target_room_alias, target_room_id, target_user; separated by /
{token}Access Tokenstringyessecret
{user}Usernamestringno

Query parameters

ParameterMeaningTypeDefaultNotes
autoverifyAutomatic Device Verificationboolno
discoveryServer Discoveryboolyes
e2eeEnd-to-End Encryptionboolyes
hsreqForce Home Server on Room IDsboolyes
imageInclude Imageboolno
modeWebhook Modechoiceoff (usually; depends on the URL)one of off, matrix, slack, t2bot, hookshot
msgtypeMessage Typechoicetextone of text, notice
pathWebhook Pathstring/webhook
toTargetslistsets {targets}
tokenAccess Tokenstringsets {token}
versionMatrix API Versionchoice3also v; one of 2, 3
keystoreKey store directorystringkeeps this URL’s state under the directory

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

matrix://user:pass@localhost
matrix://user:pass@localhost/!room:localhost
matrix://user:pass@localhost/!r1:localhost/!r2:localhost
matrixs://cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
https://webhooks.t2bot.io/api/v1/matrix/hook/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/
matrix://user:pass@localhost/!room:localhost?v=2
matrixs://user:pass@localhost/!room:localhost?e2ee=no
matrix://user:pass@localhost/!room?hsreq=no

Rejected URLs:

matrix://
matrixs://
matrix://localhost
matrix://user:token@localhost:123/#general/?v=invalid

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'matrix://user:pass@localhost'

Notes

Attachment encryption (Matrix EncryptedFile v2, AES-256-CTR).