Reddit - post a comment as a registered app

PythonSocial Media
POST api.upapi.io/reddit-oauth-post-comment.post

Posts a comment through Reddit's documented OAuth2 API using a refresh token, with the caller's own User-Agent. Verifies the token's account against expectedUsername before creating anything, and turns Reddit's HTTP-200 `json.errors` refusals (locked thread, subreddit ban, rate limit) into classified failures. No browser, no captcha, no cookies.

redditoauthcommentsocial
AuthAPI key
Cost4 units
Timeout60s
CacheNone

Request schema

FieldTypeDescription
textreq
stringThe comment body, markdown, exactly as it will appear.
thingIdreq
stringFullname of what is being replied to: t3_<id> for a post, t1_<id> for another comment. This is the complete address of the parent -- unlike the cookie path, no page URL is needed or accepted.
clientIdreq
stringReddit app client id
proxyUrl
Optional exit IP. Omit for the worker's default egress -- the OAuth lane has no per-account IP requirement of its own.· default: null
userAgentreq
stringThe User-Agent this request is made with, sent verbatim. REQUIRED and never defaulted -- Reddit's API rules ask for a descriptive UA naming the app.
clientSecretreq
stringReddit app client secret. Never logged.
refreshTokenreq
stringOAuth2 refresh token for the posting account. Never logged, never returned.
expectedUsernamereq
stringThe account this comment must be attributed to. REQUIRED, unlike on the read operation: a refresh token is opaque, so without this a mis-filed credential posts under an identity nobody chose -- and every gate upstream reasoned about a different account. Compared against the name Reddit itself reports, before anything is created.

Response schema

FieldTypeDescription
postedAsreq
stringThe username Reddit reported for the token, echoed so a caller records who actually spoke rather than who it believed it had asked for.
commentIdreq
stringThe new comment's id, without the t1_ prefix
elapsedMsreq
integer
permalinkreq
stringAbsolute permalink to the comment. Reddit returns a site-relative path; it is made absolute here so no caller has to know which host to prepend.
createdUtcreq
numberCreation time Reddit recorded, epoch seconds UTC
parentThingIdreq
stringThe fullname this comment replies to
commentFullnamereq
stringThe new comment's fullname, e.g. t1_abc123

Try it

Try it

The comment body, markdown, exactly as it will appear.

Fullname of what is being replied to: t3_<id> for a post, t1_<id> for another comment. This is the complete address of the parent -- unlike the cookie path, no page URL is needed or accepted.

Reddit app client id

The User-Agent this request is made with, sent verbatim. REQUIRED and never defaulted -- Reddit's API rules ask for a descriptive UA naming the app.

Reddit app client secret. Never logged.

OAuth2 refresh token for the posting account. Never logged, never returned.

The account this comment must be attributed to. REQUIRED, unlike on the read operation: a refresh token is opaque, so without this a mis-filed credential posts under an identity nobody chose -- and every gate upstream reasoned about a different account. Compared against the name Reddit itself reports, before anything is created.

Optional exit IP. Omit for the worker's default egress -- the OAuth lane has no per-account IP requirement of its own.

Run this endpoint live

Jump in as a guest — no signup — and run reddit-oauth-post-comment.post with your own inputs. Create a free account anytime to get your own API key.

Sign in

Code examples

curl -X POST https://api.upapi.io/reddit-oauth-post-comment.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "text": "Hello, world", "thingId": "example", "clientId": "example", "userAgent": "example", "clientSecret": "example", "refreshToken": "example", "expectedUsername": "example" }'

Developer tools

OpenAPI specImport the spec or collection into Postman, Insomnia, or any codegen tool.