> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reddit API

> Reddit API का उपयोग करके पोस्ट करने के विकल्प

export const HeaderAPI = ({noProfileKey, profileKeyRequired}) => <>
    <ParamField header="Authorization" type="string" required>
      <a href="/apis/overview#authorization">API Key</a> of the Primary Profile.
      <br />
      <br />
      Format: <code>Authorization: Bearer API_KEY</code>
    </ParamField>
    {!noProfileKey && (profileKeyRequired ? <ParamField header="Profile-Key" type="string" required>
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField> : <ParamField header="Profile-Key" type="string">
          <a href="/apis/overview#profile-key-format">Profile Key</a> of a User Profile.
          <br />
          <br />
          Format: <code>Profile-Key: PROFILE_KEY</code>
        </ParamField>)}
  </>;

## Reddit पर पोस्ट करना

Reddit API का उपयोग करके पोस्ट करने के लिए निम्नलिखित आवश्यक body पैरामीटर हैं। कृपया सुनिश्चित करें कि subreddit स्वचालित पोस्टिंग की अनुमति देता है।
अधिक जानकारी के लिए कृपया [Reddit Media Guidelines](/media-guidelines/reddit) और [Reddit Authorization](/dashboard/connect-social-accounts/reddit) देखें।

```json Reddit Post theme={"system"}
{
  "post": "Reddit post", // empty string is allowed
  "platforms": ["reddit"], // required
  "redditOptions": {
    "title": "Reddit Post Title", // required
    "subreddit": "test", // required (no "/r/" needed)
    "link": "https://www.website.com" // optional: post a link
  }
}
```

<ul class="custom-bullets">
  <li>`title` (आवश्यक): Reddit पर पोस्ट का टाइटल।</li>

  <li>
    `subreddit` (आवश्यक): वह subreddit जहाँ पोस्ट भेजी जाए। कृपया सुनिश्चित करें कि आप subreddit के
    पोस्टिंग दिशानिर्देशों का पालन करें। परीक्षण के लिए उपयोग करने के लिए एक अच्छा subreddit */r/test/* है और इसे यहाँ देखा जा सकता है:
    [https://www.reddit.com/r/test/](https://www.reddit.com/r/test/)
  </li>

  <li>
    `link` (वैकल्पिक): यदि Reddit पर पोस्ट कर रहे हैं और आप subreddit पर टेक्स्ट के बजाय एक लिंक पोस्ट करना
    चाहते हैं। जबकि `post` पैरामीटर टेक्स्ट अभी भी आवश्यक है, यह पोस्ट में शामिल नहीं है
    क्योंकि Reddit लिंक में टेक्स्ट बॉडी नहीं हो सकती।
  </li>
</ul>

<Warning>
  पोस्ट करने से पहले हमेशा subreddit के नियम जांचें। कुछ subreddits में karma थ्रेशोल्ड होता है,
  कुछ समय के लिए मेंबरशिप आवश्यक होती है, पोस्टिंग की आवृत्ति सीमित होती है, इमेज की अनुमति नहीं देते, या
  flair जोड़ने की आवश्यकता होती है। साथ ही, अधिकांश subreddits में spam और self-promotion पर विशिष्ट नियम होते हैं।
  इन नियमों का पालन न करने पर subreddit या Reddit द्वारा प्रतिबंधित किया जा सकता है।
</Warning>

## Reddit पर एक इमेज पोस्ट करना

Reddit पर एक इमेज पोस्ट करें, या तो `mediaUrl` पैरामीटर में इमेज URL शामिल करके या `redditOptions` के `link` पैरामीटर में। `link` के रूप में पोस्ट की गई इमेज पूर्ण इमेज पर रिज़ॉल्व होगी।

`post` पैरामीटर टेक्स्ट को अनदेखा किया जाता है, लेकिन पोस्ट को सफलतापूर्वक सबमिट करने के लिए यह अभी भी आवश्यक है। Reddit इमेज और टेक्स्ट को एक साथ पोस्ट करने को अपने ऑनलाइन "fancy pants" एडिटर तक सीमित करता है। इसका मतलब है कि या तो एक इमेज या टेक्स्ट पोस्ट किया जा सकता है, लेकिन दोनों एक साथ नहीं।

```json Reddit Post with Image theme={"system"}
{
  "post": "Reddit post", // required, but not added to the post
  "platforms": ["reddit"], // required
  "mediaUrls": "https://my-media-url.com",
  "redditOptions": {
    "title": "Reddit Post Title", // required
    "subreddit": "test" // required (no "/r/" needed)
  }
}
```

## Reddit Flair जोड़ें

कुछ subreddits को flair की आवश्यकता होती है। Subreddit मॉडरेटर flair को पूर्व-परिभाषित करते हैं और प्रत्येक flair का एक अद्वितीय ID होता है। Ayrshare के लिए Reddit पोस्ट में flair ID और यदि टेक्स्ट को override किया जा सकता है तो वैकल्पिक flair टेक्स्ट जोड़ें।

```json Reddit Post with Flair theme={"system"}
{
  "redditOptions": {
    "flairId": "jM8nH92enjswas", // Id of the flair
    "flairText": "My New Flair text" // Override the flair text if allowed by flair
  }
}
```

आप [/post/redditFlair](/apis/utils/reddit-get-flair) endpoint को कॉल करके एक subreddit की flair ID पा सकते हैं।

## जांचें कि Subreddit मौजूद है या नहीं

[/validate endpoint](/apis/validate/check-subreddit) के साथ जांचें कि एक subreddit मौजूद है या नहीं।

## Reddit पोस्ट में rich text formatting जोड़ें

यदि आप Reddit पोस्ट में bold, italic, या superscript टेक्स्ट जोड़ना चाहते हैं, तो [Reddit-flavored Markdown](https://www.reddit.com/wiki/markdown#wiki_new_reddit-flavored_markdown) का उपयोग करें।

```json Reddit Post with Rich Text theme={"system"}
{
  "post": "For example, this can be *italic* or **bold** or ^super ",
  "platforms": ["reddit"],
  "redditOptions": {
    "title": "Rich Text Post",
    "subreddit": "test"
  }
}
```

## Reddit Mentions

किसी अन्य Reddit उपयोगकर्ता या subreddit का उल्लेख करें।

<ul class="custom-bullets">
  <li>पोस्ट टेक्स्ट में `@subreddit` या `u/username` जोड़कर एक Reddit उपयोगकर्ता का उल्लेख करें।</li>
  <li>पोस्ट टेक्स्ट में `r/subreddit` जोड़कर एक subreddit का उल्लेख करें।</li>
</ul>

उदाहरण के लिए:

```json Reddit Post with Mention theme={"system"}
{
  "post": "The best Reddit post ever for user @ayrshare and subreddit r/SiliconValleyHBO",
  "platforms": ["reddit"]
}
```

<Warning>
  कृपया mentions पर [महत्वपूर्ण नियम](/testing/post-verification#mentions) देखें।
</Warning>

## Character Limits

अधिक जानकारी के लिए कृपया [Reddit Character Limits](/help-center/technical-support/character_limits#reddit-character-limits) देखें।

## अतिरिक्त Endpoints

<Card title="Get Reddit Flair" icon="code" href="/apis/utils/reddit-get-flair" horizontal />
