> ## 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>
  **前提条件**

  作業を始める前に、次のものが必要です。

  * 承認済みの App を持つ[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * ユーザーアクセストークン (OAuth 1.0a または OAuth 2.0 PKCE)
</Note>

***

<div id="available-endpoints">
  ## 利用可能なエンドポイント
</div>

<CardGroup cols={2}>
  <Card title="ピン留めしたリストの取得" icon="thumbtack" href="/ja/x-api/lists/pinned-lists/quickstart/pinned-list-lookup">
    自分のピン留めしたリストを取得する
  </Card>

  <Card title="ピン留めしたリストの管理" icon="pin" href="/ja/x-api/lists/pinned-lists/quickstart/manage-pinned-lists">
    リストをピン留めおよびピン留め解除する
  </Card>
</CardGroup>

***

<div id="authentication">
  ## 認証
</div>

| 操作              | 認証                            |
| :-------------- | :---------------------------- |
| ピン留めされたリストの取得   | OAuth 1.0a または OAuth 2.0 PKCE |
| リストのピン留め/ピン留め解除 | OAuth 1.0a または OAuth 2.0 PKCE |

<Warning>
  取得および管理のどちらの操作も、ユーザーコンテキストを伴う認証が必要です。App-only (ベアラートークン) 認証はサポートされていません。
</Warning>

***

<div id="quick-example">
  ## クイック例
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  # ピン留めされているリストを取得
  curl "https://api.x.com/2/users/2244994945/pinned_lists" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

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

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # ピン留めされているリストを取得
  response = client.lists.get_pinned("2244994945")

  for lst in response.data:
      print(f"{lst.name}")
  ```

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

  const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

  // ピン留めされているリストを取得
  const response = await client.lists.getPinned("2244994945");

  response.data?.forEach((lst) => {
    console.log(lst.name);
  });
  ```
</CodeGroup>

***

<div id="next-steps">
  ## 次のステップ
</div>

<CardGroup cols={2}>
  <Card title="リストの検索" icon="list" href="/ja/x-api/lists/list-lookup/quickstart">
    リストの詳細を取得
  </Card>

  <Card title="リストの管理" icon="pen" href="/ja/x-api/lists/manage-lists/quickstart">
    リストを作成・更新
  </Card>
</CardGroup>
