> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# सूची सदस्यों का प्रबंधन

> सूची में सूची सदस्यों को जोड़ें और हटाएँ

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

यह मार्गदर्शिका आपको किसी सूची में सूची सदस्यों को जोड़ने और हटाने की प्रक्रिया बताती है।

<Note>
  **पूर्वापेक्षाएँ**

  शुरू करने से पहले, आपको निम्नलिखित की आवश्यकता होगी:

  * स्वीकृत ऐप के साथ एक [डेवलपर खाता](https://developer.x.com/en/portal/petition/essential/basic-info)
  * User Access Token (OAuth 1.0a or OAuth 2.0 PKCE)
  * एक ऐसी सूची, जिसके आप स्वामी हों
</Note>

***

<div id="add-a-member-to-a-list">
  ## किसी सूची में सदस्य जोड़ें
</div>

<Steps>
  <Step title="सूची ID और user ID प्राप्त करें">
    आपको अपनी सूची की ID और उस व्यक्ति की user ID चाहिए, जिसे आप जोड़ना चाहते हैं। user ID खोजने के लिए [user lookup endpoint](/hi/x-api/users/lookup/introduction) का उपयोग करें।
  </Step>

  <Step title="सदस्य जोड़ें">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X POST "https://api.x.com/2/lists/1441162269824405510/members" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"user_id": "2244994945"}'
      ```

      ```python Python SDK theme={null}
      from xdk import Client
      from xdk.oauth1_auth import OAuth1

      oauth1 = OAuth1(
          api_key="YOUR_API_KEY",
          api_secret="YOUR_API_SECRET",
          access_token="YOUR_ACCESS_TOKEN",
          access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
      )

      client = Client(auth=oauth1)

      # किसी सूची में सदस्य जोड़ें
      response = client.lists.add_member(
          list_id="1441162269824405510",
          user_id="2244994945"
      )

      print(f"सदस्य है: {response.data.is_member}")
      ```

      ```javascript JavaScript SDK theme={null}
      import { Client, OAuth1 } from "@xdevplatform/xdk";

      const oauth1 = new OAuth1({
        apiKey: "YOUR_API_KEY",
        apiSecret: "YOUR_API_SECRET",
        accessToken: "YOUR_ACCESS_TOKEN",
        accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
      });

      const client = new Client({ oauth1 });

      // किसी सूची में सदस्य जोड़ें
      const response = await client.lists.addMember("1441162269824405510", {
        userId: "2244994945",
      });

      console.log(`सदस्य है: ${response.data?.is_member}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="रिस्पॉन्स की समीक्षा करें">
    ```json theme={null}
    {
      "data": {
        "is_member": true
      }
    }
    ```
  </Step>
</Steps>

***

<div id="remove-a-member-from-a-list">
  ## किसी सूची से सदस्य हटाएँ
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.x.com/2/lists/1441162269824405510/members/2244994945" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python Python SDK theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # किसी सूची से सदस्य हटाएँ
  response = client.lists.remove_member(
      list_id="1441162269824405510",
      user_id="2244994945"
  )

  print(f"क्या सदस्य है: {response.data.is_member}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // किसी सूची से सदस्य हटाएँ
  const response = await client.lists.removeMember(
    "1441162269824405510",
    "2244994945"
  );

  console.log(`क्या सदस्य है: ${response.data?.is_member}`);
  ```
</CodeGroup>

**रिस्पॉन्स:**

```json theme={null}
{
  "data": {
    "is_member": false
  }
}
```

***

<div id="important-notes">
  ## महत्वपूर्ण नोट्स
</div>

<Note>
  * आप केवल उन्हीं सूचियों के सदस्यों को प्रबंधित कर सकते हैं जिनके आप स्वामी हैं
  * किसी उपयोगकर्ता को किसी सूची में जोड़ने के लिए उसकी अनुमति आवश्यक नहीं है
  * उपयोगकर्ता देख सकते हैं कि उन्हें किन सार्वजनिक सूचियों में जोड़ा गया है
</Note>

***

<div id="next-steps">
  ## अगले चरण
</div>

<CardGroup cols={2}>
  <Card title="सूची सदस्यों की जानकारी" icon="users" href="/hi/x-api/lists/list-members/quickstart/list-members-lookup">
    सूची सदस्यों को देखें
  </Card>

  <Card title="सूचियों का प्रबंधन" icon="pen" href="/hi/x-api/lists/manage-lists/quickstart">
    सूचियाँ बनाएँ और अपडेट करें
  </Card>

  <Card title="API संदर्भ" icon="code" href="/hi/x-api/lists/add-list-member">
    एंडपॉइंट का पूरा दस्तावेज़
  </Card>
</CardGroup>
