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

# List Members の概要

> List members エンドポイントを使うと、List のメンバーをルックアップし、List メンバーシップを管理できます。X API v2 スタンダード階層の 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>;
};

List members エンドポイントを使うと、List のメンバーをルックアップし、List メンバーシップを管理できます。

<Note>
  **前提条件**

  始める前に、以下が必要です:

  * 承認済みの App がある [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * App の Bearer Token (ルックアップ用)
  * ユーザー Access Token (メンバーの管理用)
</Note>

***

## 利用可能なエンドポイント

<CardGroup cols={2}>
  <Card title="List members lookup" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" href="/x-api/lists/list-members/quickstart/list-members-lookup" width="24" height="24" data-path="icons/xds/icon-people.svg">
    List のメンバーを取得
  </Card>

  <Card title="Manage List members" icon="user-plus" href="/x-api/lists/list-members/quickstart/manage-list-members">
    メンバーの追加・削除
  </Card>
</CardGroup>

***

## 認証

| 操作          | 認証                                         |
| :---------- | :----------------------------------------- |
| メンバーをルックアップ | Bearer Token、OAuth 1.0a、または OAuth 2.0 PKCE |
| メンバーの追加/削除  | OAuth 1.0a または OAuth 2.0 PKCE              |

***

## クイックサンプル

<CodeGroup dropdown>
  ```bash cURL theme={null}
  # List のメンバーを取得
  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")

  # List のメンバーを取得
  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" });

  // List のメンバーを取得
  const paginator = client.lists.getMembers("84839422");

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

***

## 次のステップ

<CardGroup cols={2}>
  <Card title="List lookup" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" href="/x-api/lists/list-lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    List の詳細を取得
  </Card>

  <Card title="List Posts" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-chat.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=9fde7d51b4f18c96d3a38a81d519761f" href="/x-api/lists/list-tweets/quickstart" width="24" height="24" data-path="icons/xds/icon-chat.svg">
    List から Post を取得
  </Card>
</CardGroup>
