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

# 퀵스타트

> 이 가이드에서는 자신이 시작한 대화의 게시물 답글을 숨기고 표시하는 방법을 안내합니다. 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>;
};

이 가이드에서는 자신이 시작한 대화의 게시물 답글을 숨기고 표시하는 방법을 안내합니다.

<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="답글의 Post ID 찾기" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-chat.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=9fde7d51b4f18c96d3a38a81d519761f" width="24" height="24" data-path="icons/xds/icon-chat.svg">
    숨기고자 하는 답글의 ID를 확인합니다. 인증된 사용자가 시작한 대화의 답글만 숨길 수 있습니다.

    ```
    https://x.com/user/status/1232720193182412800
                              └── This is the Post ID
    ```
  </Step>

  <Step title="숨기기 요청 보내기" icon="eye-slash">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X PUT "https://api.x.com/2/tweets/1232720193182412800/hidden" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"hidden": true}'
      ```

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

  <Step title="답글이 숨겨졌는지 확인" icon="check">
    ```json theme={null}
    {
      "data": {
        "hidden": true
      }
    }
    ```

    이제 답글이 주 대화 뷰에서 숨겨집니다. 사용자는 "View hidden replies"를 클릭하여 여전히 볼 수 있습니다.
  </Step>
</Steps>

***

## 답글 표시

숨긴 답글을 다시 표시하려면:

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

  ```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)

  # Unhide a reply
  response = client.posts.hide_reply("1232720193182412800", hidden=False)
  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 });

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

**응답:**

```json theme={null}
{
  "data": {
    "hidden": false
  }
}
```

***

## 중요 참고사항

<Note>
  * **자신이 시작한** 대화의 답글만 숨길 수 있습니다
  * 숨겨진 답글은 "View hidden replies"를 통해 여전히 볼 수 있습니다
  * 답글 작성자에게는 답글이 숨겨졌음을 알리지 않습니다
</Note>

***

## 다음 단계

<CardGroup cols={2}>
  <Card title="주제별 관리" icon="tags" href="/x-api/posts/hide-replies/integrate/manage-replies-by-topic">
    콘텐츠 기반 답글 모더레이션
  </Card>

  <Card title="실시간 모더레이션" icon="bolt" href="/x-api/posts/hide-replies/integrate/manage-replies-in-realtime">
    답글이 도착할 때 모더레이션
  </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/posts/hide-reply" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
