> ## 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="comparing-x-apis-hide-replies-endpoints">
  ## X API의 답글 숨기기 엔드포인트 비교
</div>

v2 답글 숨기기 엔드포인트는 Labs 답글 숨기기 엔드포인트를 대체합니다. 이 엔드포인트의 Labs 버전을 사용하는 코드, App 또는 도구가 있고 더 새로운 X API v2 엔드포인트로 마이그레이션하는 것을 고려하고 있다면, 이 가이드를 참고하면 됩니다.

새로운 X API v2(답글 숨기기 엔드포인트 포함)를 사용하려면 [새 개발자 콘솔에 옵트인](https://developer.x.com/en/portal/opt-in)한 후 [Project](/ko/resources/fundamentals/developer-apps)를 생성하고, 해당 Project에 App을 추가해야 합니다. 그런 다음 해당 App과 연결된 자격 증명을 사용하여 답글 숨기기 엔드포인트로 요청을 보낼 수 있습니다. Labs v2 답글 숨기기 엔드포인트에 등록된 동일한 App을 추가하면 사용자의 인증 상태가 유지됩니다.

다음 표는 Labs와 더 새로운 X API v2 엔드포인트 간의 차이점을 비교한 것입니다.

| **설명**                                                                                                                            | **Labs v2**                            | **X API v2**                           |
| :-------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- | :------------------------------------- |
| 호스트 도메인                                                                                                                           | [https://api.x.com](https://api.x.com) | [https://api.x.com](https://api.x.com) |
| 엔드포인트 경로                                                                                                                          | /labs/2/tweets/:id/hidden              | /2/tweets/:id/hidden                   |
| 인증                                                                                                                                | OAuth 1.0a User context                | OAuth 1.0a User context                |
| 지원되는 HTTP 메서드                                                                                                                     | PUT                                    | PUT                                    |
| 기본 요청 한도                                                                                                                          | 15분당 10회 요청(인증된 모든 사용자 간에 공유)          | 15분당 50회 요청(각 인증된 사용자 기준)              |
| 답글 숨기기 가능                                                                                                                         | ✔︎                                     | ✔︎                                     |
| 이전에 숨겨진 답글 숨기기 해제 가능                                                                                                              | ✔︎                                     | ✔︎                                     |
| 답글을 여러 번 숨기거나 숨기기 해제 가능                                                                                                           | ✔︎                                     | ✔︎                                     |
| [project](/ko/resources/fundamentals/developer-apps)와 연결된 [developer App](/ko/resources/fundamentals/developer-apps)의 자격 증명 사용 필요 |                                        | ✔                                      |

***

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

<div id="hide-a-reply-v2">
  ### 답글 숨기기 (v2)
</div>

<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 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/tweets/1234567890/hidden"
  response = requests.put(url, auth=auth, json={"hidden": True})
  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.posts.hide_reply("1234567890", hidden=True)
  print(f"Hidden: {response.data.hidden}")
  ```

  ```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.posts.hideReply("1234567890", { hidden: true });
  console.log(`Hidden: ${response.data?.hidden}`);
  ```
</CodeGroup>

**기타 마이그레이션 자료**

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