| Schemes | reddit:// |
| Cargo feature | service-reddit |
| Service | https://reddit.com |
| Body formats | markdown (first is the default) |
| Attachments | no |
| Title length | 300 characters |
| Body length | 6,000 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{user}:{password}@{app_id}/{app_secret}/{targets}
{schema} is one of reddit://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{app_id} | Application ID | string | yes | secret; must match ^[a-z0-9_-]+$ | |
{app_secret} | Application Secret | string | yes | secret; must match ^[a-z0-9_-]+$ | |
{password} | Password | string | yes | secret | |
{target_subreddit} | Target Subreddit | string | no | ||
{targets} | Targets | list | yes | any of target_subreddit; separated by / | |
{user} | User Name | string | yes |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
ad | Is Ad? | bool | no | |
flair_id | Flair ID | string | ||
flair_text | Flair Text | string | ||
kind | Kind | choice | auto | one of auto, self, link |
nsfw | NSFW | bool | no | |
resubmit | Resubmit Flag | bool | no | |
spoiler | Is Spoiler | bool | no | |
to | Targets | list | sets {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-Resetis 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.