RedditapisRedditapis
DM

Send a Reddit Direct Message via HTTP

Send a direct message to any Reddit user via a single HTTP call. No browser automation, no captcha at send time, just paste cookies and the message body.

POST/api/reddit/dm$0.025 / call

Request Body

Cookies are passed as flat top-level fields (same shape as /comment and /vote).

FieldTypeRequiredDescription
to_usernamestringone ofTarget username (resolved internally to t2_xxx)
to_user_t2stringone ofTarget t2_xxx ID directly, skips the username lookup, ~300ms faster
messagestringyesPlain-text DM body
reddit_sessionstringyesSession cookie from /api/reddit/login
loidstringyesLong-lived account identifier cookie
csrf_tokenstringyesAnti-CSRF cookie

Example

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{
    "to_username": "Ok-Establishment9204",
    "message": "hey!",
    "reddit_session": "eyJhbGc...",
    "loid": "000000...",
    "csrf_token": "1c0819..."
  }' \
  "https://api.redditapis.com/api/reddit/dm"
const response = await fetch("https://api.redditapis.com/api/reddit/dm", {
  method: "POST",
  headers: {
    Authorization: "Bearer TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    to_username: "Ok-Establishment9204",
    message: "hey!",
    reddit_session: "eyJhbGc...",
    loid: "000000...",
    csrf_token: "1c0819...",
  }),
});
import requests

response = requests.post(
"https://api.redditapis.com/api/reddit/dm",
json={
"to_username": "Ok-Establishment9204",
"message": "hey!",
"reddit_session": "eyJhbGc...",
"loid": "000000...",
"csrf_token": "1c0819...",
},
headers={"Authorization": "Bearer TOKEN"},
)

Success Response

{
  "success": true,
  "to": "t2_ugmf7dmn",
  "room_id": "!hdstiJypyVtzbpoUJZe9mUc-zl-5BnADoRlS7h4itZg:reddit.com",
  "event_id": "$u7UA6fbMCcnpk5Pzx-Gv71kDuaEKYbXv0SeamHSDCaQ"
}

Errors

StatusMeaning
400Missing message, no recipient, bad to_user_t2 shape, or missing required cookies
401Missing Bearer token
403Invalid Bearer token
502Could not send the DM, most commonly because the recipient restricts DMs to friends, or the sender account is shadowbanned/spam-flagged
500Unexpected server error

Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.

On this page