redditlisted
Install: claude install-skill AceDataCloud/Skills
Call the **Reddit API** (OAuth endpoints) with `curl + jq`. The user's bearer
token is in `$REDDIT_TOKEN`. **Every call MUST send a `User-Agent` header** or
Reddit returns `429`. Use the OAuth host `https://oauth.reddit.com`.
```bash
UA="web:cloud.acedata.connectors:v1.0 (by /u/acedatacloud)"
```
Errors are JSON; a submit returns `{"json":{"errors":[...], "data":{...}}}` —
if `errors` is non-empty, show them verbatim. `401` → token expired, re-connect.
**Always 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.** `sr` is the
subreddit name WITHOUT the `r/` prefix.
```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" -