@kody/reddit
Read Reddit subreddits, listings, search, and users, and preview guarded writes through saved OAuth.
IntegrationsTopics: reddit, social, oauth, subreddit, listings, search, users, posting
- Version
- 1.0.0
- License
- MIT
- Published
- September 10, 2026
- Pinned commit
60417b1- Rating
- ★ 5.0 (1)
- Forks
- 1
- Adaptation effort
- 1.0
README
Agent docs@kody/reddit
Official Reddit logo (#FF4500) from Reddit brand guidelines.
Intent
Give any Kody account reusable, headless Reddit helpers for subreddit metadata, listings, search, user reads, a generic authenticated request escape hatch, and guarded writes (submit post, submit comment, vote). Author identity is always resolved from the connected Reddit account — never hard-coded to a specific username.
This listing is meant to be forked. After you fork, connect your Reddit account and run the smoke test on your copy. Do not treat the live @kody/reddit integration as yours.
Share this package as https://kody.codes/@kody/reddit
(never a /community/{listing_id} URL).
What it does
- Verify the saved
redditOAuth integration and read the connected account - Look up a subreddit, listing, search result, user, or post/comment thread
- Call uncommon Reddit OAuth endpoints with
./request - Preview a post, comment, or vote with
dryRun: true, then mutate only afterconfirm: true
Do not use this package as a scraper, a 24/7 bot, or a place to paste access tokens. Jobs are off.
Prerequisites / setup
Reddit is bring-your-own OAuth. There is no built-in Kody Reddit app. Tokens come from the hosted connect page (createAuthenticatedFetch('reddit')). Never paste a client secret or access token into chat.
- Open reddit.com/prefs/apps → create another app….
- Choose web app.
- redirect uri → add exactly
https://kody.codes/connect/oauth(the connect page shows the same value with a copy button). - Note the app’s client id (under the name) and secret (paste them into Kody, not into chat).
- Open this prefilled connect URL while signed in to Kody:
https://kody.codes/connect/oauth?provider=redditFirst-time setup also needs Reddit’s authorize and token URLs. Use this complete prefilled URL when the connection does not exist yet:
https://kody.codes/connect/oauth?provider=reddit&authorizeUrl=https%3A%2F%2Fwww.reddit.com%2Fapi%2Fv1%2Fauthorize&tokenUrl=https%3A%2F%2Fwww.reddit.com%2Fapi%2Fv1%2Faccess_token&apiBaseUrl=https%3A%2F%2Foauth.reddit.com&flow=confidential&tokenExchangeStyle=basic-form&allowedHosts=oauth.reddit.com%2Cwww.reddit.com&dashboardUrl=https%3A%2F%2Fwww.reddit.com%2Fprefs%2Fapps&scopes=identity%20read%20history%20mysubreddits%20submit%20edit%20vote%20save&extraAuthorizeParams=duration%3DpermanentDecoded:
- Redirect / callback:
https://kody.codes/connect/oauth - Authorize:
https://www.reddit.com/api/v1/authorize - Token:
https://www.reddit.com/api/v1/access_token - API base:
https://oauth.reddit.com - Flow:
confidentialwithtokenExchangeStyle=basic-form(HTTP Basic + form body) - Hosts:
oauth.reddit.com,www.reddit.com - Extra authorize param:
duration=permanent(needed for a refresh token) - Scopes:
identity,read,history,mysubreddits,submit,edit,vote,save
- Paste the client id and secret into the Kody form, continue to Reddit, and approve.
- Agents: see
AGENTS.mdfor smoke-test imports and write previews.
Reconnect the same connection with https://kody.codes/connect/oauth?provider=reddit. Kody reuses the saved authorize/token endpoints.
Scopes
| Scope | Used by |
|---|---|
identity | ./smoke-test, ./get-me |
read | listings, search, subreddit about, posts, comments, user about |
history | authenticated user history when requested through ./request |
mysubreddits | subscribed-community reads through ./request |
submit | ./submit-post, ./submit-comment |
edit | edits through ./request |
vote | ./vote |
save | saves through ./request |
Pass account: '<purpose>' for integration reddit-<purpose> (omit → reddit). Do not hard-code a username in forks.
Done when
- The
redditOAuth integration is connected; hostsoauth.reddit.comandwww.reddit.comare approved - Smoke test returns
{ ok: true, integration: 'reddit', hasId: true, hasName: true }without the username - Writes preview with
dryRun: trueand only run live withconfirm: trueafter you approve the exact payload
Branding
community-icon.svg uses Reddit’s official brand mark (#FF4500) from Reddit brand guidelines. Reddit® is a trademark of Reddit, Inc. This package is not affiliated with or endorsed by Reddit.
Docs
Report this listing
Log in to report this listing.