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

# 통합 가이드

> mutes 엔드포인트를 통합하기 위한 핵심 개념과 모범 사례

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

이 가이드는 애플리케이션에 mutes 엔드포인트를 통합하는 데 필요한 핵심 개념을 설명합니다.

***

<div id="authentication">
  ## 인증
</div>

뮤트 엔드포인트에서 비공개 뮤트 리스트에 액세스하려면 사용자 인증이 필요합니다:

| Method                                                                                                                            | Description     |
| :-------------------------------------------------------------------------------------------------------------------------------- | :-------------- |
| [OAuth 2.0 Authorization Code with PKCE](/ko/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) | 새 애플리케이션에 권장됩니다 |
| [OAuth 1.0a User Context](/ko/resources/fundamentals/authentication)                                                              | 레거시 지원용입니다      |

<Warning>
  App-Only 인증은 지원되지 않습니다. 반드시 사용자를 대신하여 인증해야 합니다.
</Warning>

<div id="required-scopes-oauth-20">
  ### 필수 스코프 (OAuth 2.0)
</div>

| Scope        | 필요한 용도           |
| :----------- | :--------------- |
| `mute.read`  | 뮤트된 계정 조회        |
| `mute.write` | 계정 뮤트 및 해제       |
| `users.read` | 뮤트 관련 스코프와 함께 필요 |

***

<div id="endpoints-overview">
  ## 엔드포인트 개요
</div>

| Method | Endpoint                                          | Description        |
| :----- | :------------------------------------------------ | :----------------- |
| GET    | `/2/users/:id/muting`                             | 뮤트 중인 계정 목록을 조회합니다 |
| POST   | `/2/users/:id/muting`                             | 계정을 뮤트합니다          |
| DELETE | `/2/users/:source_user_id/muting/:target_user_id` | 계정 뮤트를 해제합니다       |

***

<div id="fields-and-expansions">
  ## 필드와 expansions
</div>

<div id="default-response">
  ### 기본 응답
</div>

```json theme={null}
{
  "data": [
    {
      "id": "1234567890",
      "name": "Example User",
      "username": "example"
    }
  ]
}
```

<div id="available-fields">
  ### 사용 가능한 필드
</div>

<Accordion title="user.fields">
  | 필드                  | 설명          |
  | :------------------ | :---------- |
  | `created_at`        | 계정 생성 날짜    |
  | `description`       | 프로필 소개      |
  | `profile_image_url` | 프로필 이미지 URL |
  | `public_metrics`    | 팔로워/팔로잉 수   |
  | `verified`          | 인증 상태       |
</Accordion>

<Accordion title="expansions">
  | 확장                | 설명           |
  | :---------------- | :----------- |
  | `pinned_tweet_id` | 사용자가 고정한 게시물 |
</Accordion>

<div id="example-with-fields">
  ### fields가 포함된 예시
</div>

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

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

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # 추가 fields와 함께 뮤트한 사용자 조회
  for page in client.users.get_muting(
      user_id="123456789",
      user_fields=["username", "verified", "created_at"],
      max_results=100
  ):
      for user in page.data:
          print(f"{user.username} - Verified: {user.verified}")
  ```

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

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

  const paginator = client.users.getMuting("123456789", {
    userFields: ["username", "verified", "created_at"],
    maxResults: 100,
  });

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

***

<div id="pagination">
  ## 페이지네이션
</div>

뮤트 리스트가 많은 사용자의 경우 결과가 페이지네이션되어 반환됩니다:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  # 첫 번째 요청
  curl "https://api.x.com/2/users/123/muting?max_results=100" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"

  # 페이지네이션 토큰을 사용하는 이후 요청
  curl "https://api.x.com/2/users/123/muting?max_results=100&pagination_token=NEXT_TOKEN" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

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

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # SDK가 페이지네이션을 자동으로 처리합니다
  all_muted = []

  for page in client.users.get_muting(user_id="123", max_results=100):
      if page.data:
          all_muted.extend(page.data)

  print(f"Muted {len(all_muted)} users")
  ```

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

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

  async function getAllMutedUsers(userId) {
    const allMuted = [];

    // SDK가 페이지네이션을 자동으로 처리합니다
    const paginator = client.users.getMuting(userId, { maxResults: 100 });

    for await (const page of paginator) {
      if (page.data) {
        allMuted.push(...page.data);
      }
    }

    return allMuted;
  }

  // 사용 예
  const muted = await getAllMutedUsers("123");
  console.log(`Muted ${muted.length} users`);
  ```
</CodeGroup>

<Card title="페이지네이션 가이드" icon="arrow-right" href="/ko/x-api/fundamentals/pagination">
  페이지네이션에 대해 자세히 알아보기
</Card>

***

<div id="behavior-differences">
  ## 동작 방식의 차이
</div>

<div id="muting-vs-blocking">
  ### 음소거 vs 차단
</div>

| 기능            | 음소거        | 차단        |
| :------------ | :--------- | :-------- |
| 상대방 포스트 보기    | 아니요 (숨김)   | 아니요       |
| 상대방이 내 포스트 보기 | 예          | 아니요       |
| 상대방이 나를 팔로우   | 예 (팔로우 가능) | 아니요 (해제됨) |
| 상대방이 DM 보내기   | 예          | 아니요       |
| 알림 전송         | 아니요        | 아니요       |

<Tip>
  음소거는 비공개입니다. 음소거된 사용자는 알림을 받지 못하며, 자신이 음소거되었는지 알 수 없습니다.
</Tip>

***

<div id="error-handling">
  ## 오류 처리
</div>

| Status | Error     | Solution         |
| :----- | :-------- | :--------------- |
| 400    | 잘못된 요청    | 사용자 id 형식을 확인하세요 |
| 401    | 인증되지 않음   | 액세스 토큰을 확인하세요    |
| 403    | 권한 없음     | 스코프와 권한을 확인하세요   |
| 404    | 찾을 수 없음   | 사용자가 존재하지 않습니다   |
| 429    | 요청이 너무 많음 | 기다렸다가 다시 시도하세요   |

***

<div id="next-steps">
  ## 다음 단계
</div>

<CardGroup cols={2}>
  <Card title="빠른 시작" icon="rocket" href="/ko/x-api/users/mutes/quickstart/manage-mutes-quickstart">
    첫 음소거 요청 보내기
  </Card>

  <Card title="차단" icon="ban" href="/ko/x-api/users/blocks/introduction">
    음소거 대신 사용자 차단하기
  </Card>

  <Card title="API 참조 문서" icon="code" href="/ko/x-api/users/get-muting">
    전체 엔드포인트 문서
  </Card>

  <Card title="샘플 코드" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    실행 가능한 코드 예제
  </Card>
</CardGroup>
