> ## 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.

# Mutes Lookup

> 이 가이드는 X API를 사용하여 뮤트된 사용자 목록을 조회하는 방법을 안내합니다. 퀵스타트를 다루는 X API v2 standard 티어 레퍼런스입니다.

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

이 가이드는 X API를 사용하여 뮤트된 사용자 목록을 조회하는 방법을 안내합니다.

<Note>
  **사전 요구사항**

  시작하기 전에 다음이 필요합니다:

  * 승인된 App이 포함된 [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * User Access Token (OAuth 1.0a 또는 OAuth 2.0 PKCE)
</Note>

***

## 뮤트된 사용자 가져오기

<Steps>
  <Step title="사용자 ID 가져오기">
    인증된 사용자의 ID가 필요합니다. [user lookup 엔드포인트](/x-api/users/lookup/introduction)를 사용하거나 Access Token(숫자 부분이 사용자 ID)에서 찾을 수 있습니다.
  </Step>

  <Step title="뮤트된 사용자 요청">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl "https://api.x.com/2/users/123456789/muting?\
      user.fields=created_at,username,verified&\
      max_results=100" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN"
      ```

      ```python title="Python SDK" lines wrap icon="python" theme={null}
      from xdk import Client

      client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

      # 페이지네이션으로 뮤트된 사용자 가져오기
      for page in client.users.get_muting(
          "123456789",
          user_fields=["created_at", "username", "verified"],
          max_results=100
      ):
          for user in page.data:
              print(f"{user.username} - Muted")
      ```

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

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

      // 페이지네이션으로 뮤트된 사용자 가져오기
      const paginator = client.users.getMuting("123456789", {
        userFields: ["created_at", "username", "verified"],
        maxResults: 100,
      });

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

  <Step title="응답 확인">
    ```json theme={null}
    {
      "data": [
        {
          "id": "2244994945",
          "name": "X Developers",
          "username": "XDevelopers",
          "created_at": "2013-12-14T04:35:55.000Z",
          "verified": true
        }
      ],
      "meta": {
        "result_count": 1,
        "next_token": "1710819323648428707"
      }
    }
    ```
  </Step>
</Steps>

***

## 추가 데이터 포함하기

고정된 Post와 같은 관련 데이터를 가져오려면 expansion을 사용하세요:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/users/123456789/muting?\
  user.fields=created_at&\
  expansions=pinned_tweet_id&\
  tweet.fields=created_at" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python title="Python SDK" lines wrap icon="python" theme={null}
  from xdk import Client

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # expansion과 함께 뮤트된 사용자 가져오기
  for page in client.users.get_muting(
      "123456789",
      user_fields=["created_at"],
      expansions=["pinned_tweet_id"],
      tweet_fields=["created_at"]
  ):
      for user in page.data:
          print(f"{user.username}")
      # 고정된 Post는 page.includes.tweets에 있음
  ```

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

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

  // expansion과 함께 뮤트된 사용자 가져오기
  const paginator = client.users.getMuting("123456789", {
    userFields: ["created_at"],
    expansions: ["pinned_tweet_id"],
    tweetFields: ["created_at"],
  });

  for await (const page of paginator) {
    page.data?.forEach((user) => {
      console.log(user.username);
    });
    // 고정된 Post는 page.includes?.tweets에 있음
  }
  ```
</CodeGroup>

### expansion이 포함된 응답

```json title="응답 예시" lines wrap icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-brackets.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=ed2428e77bab43e57800e1a590e982fa" theme={null}
{
  "data": [
    {
      "username": "XDevelopers",
      "created_at": "2013-12-14T04:35:55.000Z",
      "id": "2244994945",
      "name": "X Developers",
      "pinned_tweet_id": "1430984356139470849"
    }
  ],
  "includes": {
    "tweets": [
      {
        "created_at": "2021-08-26T20:03:51.000Z",
        "id": "1430984356139470849",
        "text": "Help us build a better X Developer Platform!..."
      }
    ]
  },
  "meta": {
    "result_count": 1
  }
}
```

***

## 결과 페이지네이션

SDK는 페이지네이션을 자동으로 처리합니다. cURL의 경우 응답에서 `next_token`을 사용하세요:

```bash theme={null}
curl "https://api.x.com/2/users/123456789/muting?\
max_results=100&\
pagination_token=1710819323648428707" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

***

## 다음 단계

<CardGroup cols={2}>
  <Card title="Manage mutes" icon="volume-xmark" href="/x-api/users/mutes/quickstart/manage-mutes-quickstart">
    사용자 뮤트 및 뮤트 해제
  </Card>

  <Card title="API 레퍼런스" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/users/get-muting" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
