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

WeChat (WeCom)

Schemeswechat://
Cargo featureservice-wechat
Servicehttps://work.weixin.qq.com/
Body formatstext (first is the default)
Attachmentsno
Title lengthno title (merged into the body)
Body length2,048 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

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

{schema} is one of wechat://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{host}Agent IDstringyesmust match ^[0-9]+$
{password}App Secretstringyessecret
{target_department}Target Departmentstringnoprefix #
{target_tag}Target Tagstringnoprefix +
{target_user}Target Userstringnoprefix @
{targets}Targetslistnoany of target_department, target_tag, target_user; separated by /
{user}Corp IDstringyes

Query parameters

ParameterMeaningTypeDefaultNotes
toTargetslistsets {targets}

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

wechat://corpid:secret@1000002/johndoe
wechat://corpid:secret@1000002/user1/user2/user3
wechat://corpid:secret@1000002/john/%23200/+3/bad!target
wechat://corpid:secret@1000002?to=@all
wechat://corpid:secret@1000002/@all?format=markdown

Rejected URLs:

wechat://
wechat://corpid
wechat://corpid:secret@
wechat://corpid:secret@notanumber

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'wechat://corpid:secret@1000002/johndoe'

Notes

WeChat / WeCom (wechat://): messages through the WeCom application API.

The access token is kept in the persistent store for expires_in minus five minutes (at least a minute) and dropped when the API reports it expired (errcode 40001, 40014, 42001).