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

# 마이그레이션 가이드

> v2 hide replies 엔드포인트가 Labs hide replies 엔드포인트를 대체합니다. hide replies를 다루는 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의 hide replies 엔드포인트 비교

v2 hide replies 엔드포인트가 Labs hide replies 엔드포인트를 대체하고 있습니다. Labs 버전의 이 엔드포인트를 사용하는 코드, 앱 또는 도구를 새로운 X API v2 엔드포인트로 마이그레이션하는 것을 고려 중이라면 이 가이드가 유용할 것입니다.

새로운 X API v2(hide replies 엔드포인트 포함)를 사용하려면 [새 Developer Console에 옵트인](https://developer.x.com/en/portal/opt-in)하고 [Project](/resources/fundamentals/developer-apps)를 생성한 뒤 해당 Project에 App을 추가해야 합니다. 그런 다음 해당 App과 연결된 자격 증명으로 hide replies 엔드포인트에 요청을 보낼 수 있습니다. Labs v2 hide replies 엔드포인트에 등록된 동일한 App을 추가하면 사용자가 인증된 상태를 유지할 수 있습니다.

다음 표는 Labs와 새로운 X API v2 엔드포인트의 차이점을 비교합니다:

| **Description**                                                                                                             | **Labs v2**                            | **X API v2**                           |
| :-------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- | :------------------------------------- |
| Host domain                                                                                                                 | [https://api.x.com](https://api.x.com) | [https://api.x.com](https://api.x.com) |
| Endpoint path                                                                                                               | /labs/2/tweets/:id/hidden              | /2/tweets/:id/hidden                   |
| Authentication                                                                                                              | OAuth 1.0a User context                | OAuth 1.0a User context                |
| 지원 HTTP 메서드                                                                                                                 | PUT                                    | PUT                                    |
| 기본 요청 rate limit                                                                                                            | 15분당 10 요청 (모든 인증 사용자 간 공유)            | 15분당 50 요청 (각 인증 사용자별)                 |
| 답글 숨기기 가능                                                                                                                   | ✔︎                                     | ✔︎                                     |
| 이전에 숨긴 답글 표시 가능                                                                                                             | ✔︎                                     | ✔︎                                     |
| 답글을 여러 번 숨기거나 표시 가능                                                                                                         | ✔︎                                     | ✔︎                                     |
| [project](/resources/fundamentals/developer-apps)에 연결된 [developer App](/resources/fundamentals/developer-apps)의 자격 증명 사용 필요 |                                        | ✔                                      |

***

## 코드 예시

### 답글 숨기기 (v2)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X PUT "https://api.x.com/2/tweets/1234567890/hidden" \
    -H "Authorization: OAuth ..." \
    -H "Content-Type: application/json" \
    -d '{"hidden": true}'
  ```

  ```python title="Python" lines wrap icon="python" theme={null}
  # Requires OAuth 1.0a User Context authentication
  import requests
  from requests_oauthlib import OAuth1

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

  url = "https://api.x.com/2/tweets/1234567890/hidden"
  response = requests.put(url, auth=auth, json={"hidden": True})
  print(response.json())
  ```

  ```python title="Python SDK" lines wrap icon="python" 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)

  # Hide a reply
  response = client.posts.hide_reply("1234567890", hidden=True)
  print(f"Hidden: {response.data.hidden}")
  ```

  ```javascript title="JavaScript SDK" lines wrap icon="square-js" 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 });

  // Hide a reply
  const response = await client.posts.hideReply("1234567890", { hidden: true });
  console.log(`Hidden: ${response.data?.hidden}`);
  ```
</CodeGroup>

**기타 마이그레이션 리소스**

[X API 마이그레이션 허브](/x-api/migrate/overview)
