Original:🇺🇸 English
Translated
Submit posts (link or text) to subreddits and read your Reddit identity / content via the Reddit API. Use when the user mentions Reddit, posting to a subreddit, submitting a link or self-post, or checking their Reddit profile / submissions.
21installs
Sourceacedatacloud/skills
Added on
NPX Install
npx skill4agent add acedatacloud/skills redditTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Call the Reddit API (OAuth endpoints) with . The user's bearer
token is in . Every call MUST send a header or
Reddit returns . Use the OAuth host .
curl + jq$REDDIT_TOKENUser-Agent429https://oauth.reddit.combash
UA="web:cloud.acedata.connectors:v1.0 (by /u/acedatacloud)"Errors are JSON; a submit returns —
if is non-empty, show them verbatim. → token expired, re-connect.
{"json":{"errors":[...], "data":{...}}}errors401Always start by confirming identity:
bash
curl -sS -H "Authorization: Bearer $REDDIT_TOKEN" -H "User-Agent: $UA" \
"https://oauth.reddit.com/api/v1/me" | jq '{name, total_karma, link_karma}'Submit a post
Confirm the subreddit + title + body with the user first. is the
subreddit name WITHOUT the prefix.
srr/bash
# Self (text) post: kind=self + text. Link post: kind=link + url.
curl -sS -X POST "https://oauth.reddit.com/api/submit" \
-H "Authorization: Bearer $REDDIT_TOKEN" -H "User-Agent: $UA" \
--data-urlencode "sr=test" \
--data-urlencode "kind=self" \
--data-urlencode "title=My title" \
--data-urlencode "text=My self-post body in markdown" \
--data-urlencode "api_type=json" \
| jq '.json | {errors, url: .data.url, id: .data.id}'For a link post:
bash
curl -sS -X POST "https://oauth.reddit.com/api/submit" \
-H "Authorization: Bearer $REDDIT_TOKEN" -H "User-Agent: $UA" \
--data-urlencode "sr=test" --data-urlencode "kind=link" \
--data-urlencode "title=My title" --data-urlencode "url=https://example.com" \
--data-urlencode "api_type=json" | jq '.json'Read my submissions
bash
curl -sS -H "Authorization: Bearer $REDDIT_TOKEN" -H "User-Agent: $UA" \
"https://oauth.reddit.com/user/USERNAME/submitted?limit=10" \
| jq '.data.children[] | .data | {title, subreddit, ups, num_comments, permalink}'Gotchas
- User-Agent is mandatory on every request — omitting it → .
429 - Many subreddits gate posting on account age / karma / flair; a submit can
return like
errors— surface it and try[["SUBREDDIT_NOTALLOWED", ...]]to validate the flow.r/test - Respect rate limits: read the response header; space out bulk submits.
X-Ratelimit-Remaining - Use as a safe target when validating that the connection works.
r/test
Record the output
After you successfully publish and obtain the live result URL, call the built-in
tool ONCE so the user can track this deliverable in My Outputs:
publish_artifactpublish_artifact(kind="message", channel="reddit", title="<title>", url="<the REAL returned URL>", status="delivered")Use the real returned URL — never fabricate one. Call it once per published item,
only after delivery is confirmed; skip it (or use ) if publishing failed.
See .
status="failed"_shared/artifacts.md