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

<div id="manage-mutes-standard-v11-compared-to-x-api-v2">
  ### 뮤트 관리: Standard v1.1과 X API v2 비교
</div>

Standard v1.1의 [POST mutes/users/create](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-create) 및 [POST mutes/users/destroy](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-destroy) 엔드포인트를 사용해 왔다면, 이 가이드는 Standard v1.1과 X API v2의 뮤트 관리 엔드포인트 간 유사점과 차이점을 이해하는 데 도움을 주는 것을 목표로 합니다.

* **유사점**
  * OAuth 1.0a 사용자 컨텍스트
* **차이점**
  * 엔드포인트 URL
  * App 및 Project 요건
  * HTTP 메서드
  * 요청 매개변수

<div id="similarities">
  #### 유사점
</div>

**OAuth 1.0a User Context 인증 방법**

두 버전의 엔드포인트는 모두 [OAuth 1.0a User Context](https://developer.x.com/content/developer-twitter/resources/fundamentals/authentication)를 지원합니다. 따라서 이전에 standard v1.1 mutes 관리 엔드포인트 중 하나를 사용했다면, X API v2 버전으로 마이그레이션하더라도 동일한 인증 방법을 계속 사용할 수 있습니다.

<div id="differences">
  #### 차이점
</div>

**엔드포인트 URL**

* Standard v1.1 엔드포인트:
  * POST [https://api.x.com/1.1/mutes/users/create.json](https://api.x.com/1.1/mutes/users/create.json)
    (사용자 뮤트)
  * POST [https://api.x.com/1.1/mutes/users/destroy.json](https://api.x.com/1.1/mutes/users/destroy.json)
    (사용자 뮤트 해제)
* X API v2 엔드포인트:
  * POST [https://api.x.com/2/users/:id/muting](https://api.x.com/2/users/:id/muting)
    (사용자 뮤트)
  * DELETE [https://api.x.com/2/users/:source\&#95;user\&#95;id/muting/:target\&#95;user\&#95;id](https://api.x.com/2/users/:source\&#95;user\&#95;id/muting/:target\&#95;user\&#95;id)
    (사용자 뮤트 해제)

**App 및 Project 요구 사항**

X API v2 엔드포인트를 사용하려면 요청을 인증할 때 [developer App](/ko/resources/fundamentals/developer-apps)과 [Project](/ko/resources/fundamentals/developer-apps)에 연결된 자격 증명을 사용해야 합니다. 모든 X API v1.1 엔드포인트는 Project에 연결되지 않은 App이든 Project에 연결된 App이든, 해당 App의 자격 증명을 사용할 수 있습니다.

**요청 파라미터**

다음 Standard v1.1 요청 파라미터에는 X API v2에서의 대응 항목이 있습니다:

| Standard v1.1 | X API v2         |
| :------------ | :--------------- |
| user\_id      | target\_user\_id |
| screen\_name  | 해당 없음            |

Standard v1.1 파라미터는 쿼리 파라미터로 전달되는 반면, X API v2 파라미터는 본문 파라미터(POST 엔드포인트의 경우) 또는 경로 파라미터(DELETE 엔드포인트의 경우)로 전달된다는 점에 유의하십시오.

또한 Standard v1.1 엔드포인트를 사용할 때는 [OAuth 1.0a User Context](/ko/resources/fundamentals/authentication)와 함께 전달되는 액세스 토큰을 통해 어떤 사용자가 뮤트/뮤트 해제를 시작했는지 알 수 있으므로, 대상 사용자를 뮤트하는 사용자의 id는 별도로 지정할 필요가 없습니다.

***

<div id="code-examples">
  ## 코드 예제
</div>

<div id="mute-a-user-v2">
  ### 사용자를 뮤트하기 (v2)
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X POST "https://api.x.com/2/users/123456789/muting" \
    -H "Authorization: OAuth ..." \
    -H "Content-Type: application/json" \
    -d '{"target_user_id": "2244994945"}'
  ```

  ```python Python theme={null}
  # OAuth 1.0a 사용자 컨텍스트 인증이 필요합니다.
  import requests
  from requests_oauthlib import OAuth1

  auth = OAuth1(
      "API_KEY", "API_SECRET",
      "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
  )

  url = "https://api.x.com/2/users/123456789/muting"
  response = requests.post(url, auth=auth, json={"target_user_id": "2244994945"})
  print(response.json())
  ```

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

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # 사용자를 뮤트합니다.
  response = client.users.mute(
      source_user_id="123456789",
      target_user_id="2244994945"
  )
  print(f"Muting: {response.data.muting}")
  ```

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

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // 사용자를 뮤트합니다.
  const response = await client.users.mute("123456789", {
    targetUserId: "2244994945",
  });
  console.log(`Muting: ${response.data?.muting}`);
  ```
</CodeGroup>

<div id="unmute-a-user-v2">
  ### 사용자 음소거 해제 (v2)
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.x.com/2/users/123456789/muting/2244994945" \
    -H "Authorization: OAuth ..."
  ```

  ```python Python theme={null}
  # OAuth 1.0a 사용자 컨텍스트 인증이 필요합니다
  import requests
  from requests_oauthlib import OAuth1

  auth = OAuth1(
      "API_KEY", "API_SECRET",
      "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
  )

  url = "https://api.x.com/2/users/123456789/muting/2244994945"
  response = requests.delete(url, auth=auth)
  print(response.json())
  ```

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

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # 사용자 음소거 해제
  response = client.users.unmute(
      source_user_id="123456789",
      target_user_id="2244994945"
  )
  print(f"Muting: {response.data.muting}")
  ```

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

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // 사용자 음소거 해제
  const response = await client.users.unmute("123456789", "2244994945");
  console.log(`Muting: ${response.data?.muting}`);
  ```
</CodeGroup>
