Lodol Docs

Reddit

API actions for the Reddit integration.

Reddit

Create posts, comment, and interact with content on Reddit using OAuth.


Comment on a post

Add a comment to a Reddit post or reply to a comment.

Parameters

ParameterTypeRequiredDescription
parent_idstringYesParent fullname ID.
textstringYesComment text.

Response

{
  "comment": {
    "body": "Great point!",
    "id": "xyz789",
    "link_id": "t3_1a2b3c"
  },
  "status": "success"
}

Create text post

Create a text-based post in a subreddit.

Parameters

ParameterTypeRequiredDescription
subredditstringYesTarget subreddit.
titlestringYesPost title.
textstringNoPost body text.

Response

{
  "post": {
    "id": "1a2b3c",
    "subreddit": "programming",
    "title": "Interesting Discussion",
    "url": "https://reddit.com/r/programming/comments/1a2b3c/"
  },
  "status": "success"
}

Fetch new subreddit posts

Retrieve the newest posts from a subreddit.

Parameters

ParameterTypeRequiredDescription
subredditstringYesSubreddit name.
limitnumberNoMaximum posts to return.

Response

{
  "posts": [
    {
      "id": "1a2b3c",
      "subreddit": "technology",
      "title": "New Feature Announcement",
      "url": "https://reddit.com/r/technology/comments/1a2b3c/"
    }
  ],
  "status": "success"
}

Upvote a post or comment

Upvote a Reddit post or comment by fullname ID.

Parameters

ParameterTypeRequiredDescription
thing_idstringYesThing fullname ID.

Response

{
  "status": "success"
}

On this page