Reddit API
Options for posting using the Reddit API
The following are required body parameters for posting to Reddit. Please be sure the subreddit allows automated posting.
title
(required): The title of the post on Reddit.subreddit
(required): The subreddit to send the post. Please be sure to follow the subreddit’s posting guidelines. A good subreddit to use for testing is /r/test/ and can be viewed at: https://www.reddit.com/r/test/link
(optional): If posting to Reddit and you want to post a link instead of text to the subreddit. While thepost
parameter text is still required, it is not included in the post since Reddit links can’t have a text body.
Posting an Image to Reddit
Post an image to Reddit either by including the image URL in the mediaUrl
parameter or the link
parameter of redditOptions
. Images posted as a link
will resolve to the full image.
The post
parameter text is ignored, but is still required to successfully submit the post. Reddit restricts posting images and text together to their online “fancy pants” editor. This means either an image or text can be posted, but not both at the same time.
Add Reddit Flair
Some subreddits require flair. Subreddit moderators pre-define the flair and each flair has a unique ID. In the Reddit post to Ayrshare add the flair ID and an optional flair text if the text can be overridden.
You can find the flair ID of a subreddit by calling the /post/redditFlair endpoint.
Check if a Subreddit Exists
Check if a subreddit exists with the /validate endpoint.
Add rich text formatting to Reddit posts
If you want to add bold, italic, or superscript text to a Reddit post, use Reddit-flavored Markdown.