> ## 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>;
};

List Members エンドポイントを使用すると、リストのメンバーを表示したり、リストにメンバーを追加したり削除したりできます。また、ユーザーがどのリストのメンバーであるかも確認できます。

<div id="overview">
  ## 概要
</div>

<CardGroup cols={2}>
  <Card title="メンバーを表示" icon="users">
    リスト内のすべてのメンバーを取得
  </Card>

  <Card title="メンバーを追加" icon="user-plus">
    リストにユーザーを追加
  </Card>

  <Card title="メンバーを削除" icon="user-minus">
    リストからユーザーを削除
  </Card>

  <Card title="メンバーシップ" icon="list">
    ユーザーが所属しているリストを表示
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## エンドポイント
</div>

<div id="list-members-lookup">
  ### リストメンバーの取得
</div>

| Method | Endpoint                                                                | Description       |
| :----- | :---------------------------------------------------------------------- | :---------------- |
| GET    | [`/2/lists/:id/members`](/ja/x-api/lists/get-list-members)              | リストのメンバーを取得       |
| GET    | [`/2/users/:id/list_memberships`](/ja/x-api/users/get-list-memberships) | ユーザーが参加しているリストを取得 |

<div id="manage-list-members">
  ### リストのメンバーを管理
</div>

| Method | Endpoint                                                              | Description |
| :----- | :-------------------------------------------------------------------- | :---------- |
| POST   | [`/2/lists/:id/members`](/ja/x-api/lists/add-list-member)             | メンバーを追加     |
| DELETE | [`/2/lists/:id/members/:user_id`](/ja/x-api/lists/remove-list-member) | メンバーを削除     |

***

<div id="example-get-list-members">
  ## 例: リストメンバーを取得する
</div>

```bash theme={null}
curl "https://api.x.com/2/lists/1234567890/members?\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

<div id="example-add-a-member">
  ## 例：メンバーの追加
</div>

```bash theme={null}
curl -X POST "https://api.x.com/2/lists/1234567890/members" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "9876543210"}'
```

***

<div id="getting-started">
  ## はじめに
</div>

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 開発者コンソール内の[Project と App](/ja/resources/fundamentals/developer-apps)
  * App の[キーとトークン](/ja/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="ルックアップ クイックスタート" icon="users" href="/ja/x-api/lists/list-members/quickstart/list-members-lookup">
    リストメンバーの取得
  </Card>

  <Card title="管理クイックスタート" icon="user-plus" href="/ja/x-api/lists/list-members/quickstart/manage-list-members">
    メンバーの追加・削除
  </Card>

  <Card title="インテグレーションガイド" icon="book" href="/ja/x-api/lists/list-members/integrate">
    重要な概念とベストプラクティス
  </Card>

  <Card title="APIリファレンス" icon="code" href="/ja/x-api/lists/list-members-lookup">
    エンドポイントの詳細ドキュメント
  </Card>
</CardGroup>
