Auth
Reddit API Login - Username and Password Authentication Endpoint
Reddit API login endpoint - authenticate to Reddit with username and password (plus optional 2FA TOTP) and get the full set of session cookies for /comment, /vote, and /dm calls.
POST
/api/reddit/login$0.012 / callLog in to Reddit with username + password. Returns the session cookies you need to paste into /comment, /vote, and /dm.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Reddit username or email |
password | string | Yes | Account password |
totp_secret | string | No | Base32 TOTP secret for accounts with 2FA enabled. The 6-digit code is generated server-side. Omit if 2FA is off. |
method | string | No | http (default) or browser. Use browser for the most compatible write-session cookies, especially when you plan to call /vote. |
proxy | object | No | Bring your own sticky IP for this account — {server, username, password}. Omit to use the default pool. |
{
"username": "your_reddit_username",
"password": "...",
"method": "browser",
"proxy": {
"server": "http://host:port",
"username": "...",
"password": "..."
}
}Response (200)
{
"success": true,
"username": "your_reddit_username",
"link_karma": 1,
"comment_karma": 315,
"cookies": {
"reddit_session": "...",
"loid": "...",
"token_v2": "...",
"csrf_token": "...",
"edgebucket": "...",
"csv": "2",
"session_tracker": "..."
}
}Failure returns 401 with success: false + diagnostic error message + page_url + page_text_sample.
Notes
- Flow: call
/loginonce → get cookies → paste them as flat top-level fields into/comment,/vote, or/dm. Re-login when they expire. - Login method: omit
methodor usehttpfor the faster login flow. Usemethod: "browser"when you need maximum compatibility for write actions such as/vote. - 2FA: pass
totp_secret(the Base32 string from the QR code) when enrolling the account; the server generates the 6-digit code per request.
Example
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"username":"your_reddit_username","password":"your_password","method":"browser"}' \
"https://api.redditapis.com/api/reddit/login"const response = await fetch("https://api.redditapis.com/api/reddit/login", {
method: "POST",
headers: {
Authorization: "Bearer TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
username: "your_reddit_username",
password: "your_password",
method: "browser",
}),
});import requests
response = requests.post(
"https://api.redditapis.com/api/reddit/login",
json={
"username": "your_reddit_username",
"password": "your_password",
"method": "browser",
},
headers={"Authorization": "Bearer TOKEN"},
)Search Communities
Search subreddits by name or topic — the Communities tab on reddit.com. Verified to match Reddit's UI rank order for SFW and NSFW queries, with pagination.
CommentHot
Post a comment on any Reddit thread programmatically. Handles reCAPTCHA, CSRF tokens, and rich-text encoding for you — just send post URL and text.
