RedditAPIRedditAPIs
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 / call

Log in to Reddit with username + password. Returns the session cookies you need to paste into /comment, /vote, and /dm.

Request Body

FieldTypeRequiredDescription
usernamestringYesReddit username or email
passwordstringYesAccount password
totp_secretstringNoBase32 TOTP secret for accounts with 2FA enabled. The 6-digit code is generated server-side. Omit if 2FA is off.
methodstringNohttp (default) or browser. Use browser for the most compatible write-session cookies, especially when you plan to call /vote.
proxyobjectNoBring 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 /login once → get cookies → paste them as flat top-level fields into /comment, /vote, or /dm. Re-login when they expire.
  • Login method: omit method or use http for the faster login flow. Use method: "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"},
)

On this page