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

OneBot

Schemesonebot://, onebots://
Cargo featureservice-onebot
Servicehttps://github.com/botuniverse/onebot-11
Body formatstext (first is the default)
Attachmentsyes
Title lengthno title (merged into the body)
Body length4,500 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

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

{schema} is one of onebot://, onebots://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{host}Hostnamestringyes
{port}Portint, 1 to 65535no
{target_group}Target Group IDstringnoprefix #; must match ^[0-9]{1,19}$
{target_user}Target User IDstringnoprefix @; must match ^[0-9]{1,19}$
{targets}Targetslistnoany of target_group, target_user; separated by /
{token}Access Tokenstringnosecret

Query parameters

ParameterMeaningTypeDefaultNotes
toTargetslistsets {targets}
tokenAccess Tokenstringsets {token}

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

onebot://localhost/12345
onebot://localhost/1/%232
onebot://localhost:3000/@12345/%2367890
onebots://tok%20en@localhost:5700/@12345/%23678
onebot://localhost/abc/12345/11111111111111111111
onebot://localhost/12345?token=abc
onebot://localhost/?to=%23999,222,111

Rejected URLs:

onebot://

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'onebot://localhost/12345'

Notes

OneBot 11 HTTP API (onebot://, onebots://): messages through a OneBot 11 HTTP API server.