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

Reddit

Schemesreddit://
Cargo featureservice-reddit
Servicehttps://reddit.com
Body formatsmarkdown (first is the default)
Attachmentsno
Title length300 characters
Body length6,000 characters
Body linesunlimited
Request throttlenone
Vendor URLs acceptedno

URL formats

{schema}://{user}:{password}@{app_id}/{app_secret}/{targets}

{schema} is one of reddit://.

URL tokens

TokenMeaningTypeRequiredDefaultNotes
{app_id}Application IDstringyessecret; must match ^[a-z0-9_-]+$
{app_secret}Application Secretstringyessecret; must match ^[a-z0-9_-]+$
{password}Passwordstringyessecret
{target_subreddit}Target Subredditstringno
{targets}Targetslistyesany of target_subreddit; separated by /
{user}User Namestringyes

Query parameters

ParameterMeaningTypeDefaultNotes
adIs Ad?boolno
flair_idFlair IDstring
flair_textFlair Textstring
kindKindchoiceautoone of auto, self, link
nsfwNSFWboolno
resubmitResubmit Flagboolno
spoilerIs Spoilerboolno
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):

reddit://user:password@app-id/app-secret/mercurio
reddit://user:password@app-id/app-secret/mercurio/subreddit2
reddit://user:pass@id/secret/sub?kind=LINK
reddit://user:pass@id/secret/%23sub7/sub6/?flair_id=wonder&flair_text=not%20for%20you
reddit://user:pass@id/secret/sub/?ad=yes&nsfw=yes&replies=no&resubmit=yes&spoiler=yes&kind=self
reddit://?user=l2g&pass=pass&app_secret=abc123&app_id=54321&to=sub1,sub2

Rejected URLs:

reddit://
reddit://:@/
reddit://user@app_id/app_secret/
reddit://user:password@app-id/

Send one from the command line:

mercurio -t 'Backup' -b 'Finished in 42s' 'reddit://user:password@app-id/app-secret/mercurio'

Notes

Reddit (reddit://): posts to subreddits through the Reddit API.

The OAuth access token is kept for the lifetime of the parsed URL (a non-persistent store entry) and replaced whenever a failed submit logs in again.

Differences with Apprise

  • The token is dropped after expires_in (Apprise computes the expiry but never checks it).
  • X-RateLimit-Reset is read as the seconds left in the window, as Reddit documents it; Apprise reads it as a Unix time, so its back-off never waits. The budget is kept for the life of the URL, as in Apprise.
  • After a failed submit Apprise retries with the previous bearer token (stale headers), while mercurio retries with the fresh one.