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

# List Members Overview

> The List members endpoints let you look up members of a List and manage List membership. Reference for the X API v2 standard tier covering quickstart.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <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>;
};

The List members endpoints let you look up members of a List and manage List membership.

<Note>
  **Prerequisites**

  Before you begin, you'll need:

  * A [developer account](https://developer.x.com/en/portal/petition/essential/basic-info) with an approved App
  * Your App's Bearer Token (for lookups)
  * User Access Token (for managing members)
</Note>

***

## Available endpoints

<CardGroup cols={2}>
  <Card title="List members lookup" icon="https://mintcdn.com/x-preview-mintlify-143107c1/ze5k6TCY1Wgf7gM4/icons/xds/icon-people.svg?fit=max&auto=format&n=ze5k6TCY1Wgf7gM4&q=85&s=da9d7dce3f7ff0f4e88b555aee7b8e1e" href="/x-api/lists/list-members/quickstart/list-members-lookup" width="24" height="24" data-path="icons/xds/icon-people.svg">
    Get members of a List
  </Card>

  <Card title="Manage List members" icon="user-plus" href="/x-api/lists/list-members/quickstart/manage-list-members">
    Add and remove members
  </Card>
</CardGroup>

***

## Authentication

| Operation          | Authentication                              |
| :----------------- | :------------------------------------------ |
| Look up members    | Bearer Token, OAuth 1.0a, or OAuth 2.0 PKCE |
| Add/remove members | OAuth 1.0a or OAuth 2.0 PKCE                |

***

## Quick example

<CodeGroup dropdown>
  ```bash cURL theme={null}
  # Get List members
  curl "https://api.x.com/2/lists/84839422/members" \
    -H "Authorization: Bearer $BEARER_TOKEN"
  ```

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

  client = Client(bearer_token="YOUR_BEARER_TOKEN")

  # Get List members
  for page in client.lists.get_members("84839422"):
      for user in page.data:
          print(f"{user.username}")
  ```

  ```javascript title="JavaScript SDK" lines wrap icon="square-js" theme={null}
  import { Client } from "@xdevplatform/xdk";

  const client = new Client({ bearerToken: "YOUR_BEARER_TOKEN" });

  // Get List members
  const paginator = client.lists.getMembers("84839422");

  for await (const page of paginator) {
    page.data?.forEach((user) => {
      console.log(user.username);
    });
  }
  ```
</CodeGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="List lookup" icon="https://mintcdn.com/x-preview-mintlify-143107c1/-vUZNvNnsedeyKnT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=-vUZNvNnsedeyKnT&q=85&s=4ff4e2300afadbf6c9c64712c8d3f0fa" href="/x-api/lists/list-lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    Get List details
  </Card>

  <Card title="List Posts" icon="https://mintcdn.com/x-preview-mintlify-143107c1/-vUZNvNnsedeyKnT/icons/xds/icon-chat.svg?fit=max&auto=format&n=-vUZNvNnsedeyKnT&q=85&s=65931703120a2ba61763b171daa57b14" href="/x-api/lists/list-tweets/quickstart" width="24" height="24" data-path="icons/xds/icon-chat.svg">
    Get Posts from a List
  </Card>
</CardGroup>
