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

# Retweets

> Retweets 엔드포인트를 사용하면 게시물을 리트윗하거나 리트윗을 취소하고, 어떤 사용자가 게시물을 리트윗했는지 확인하고, 자신의 게시물의 리포스트를 가져올 수 있습니다. retweets를 다루는 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>;
};

Retweets 엔드포인트를 사용하면 게시물을 리트윗하거나 리트윗을 취소하고, 어떤 사용자가 게시물을 리트윗했는지 확인하고, 자신의 게시물의 리포스트를 가져올 수 있습니다.

## 개요

<CardGroup cols={2}>
  <Card title="Retweet" icon="retweet">
    사용자를 대신해 게시물 리트윗
  </Card>

  <Card title="Retweet 취소" icon="xmark">
    리트윗 제거
  </Card>

  <Card title="Retweeting 사용자" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-people.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=9d5f3f82edcd2a4070364193436e7980" width="24" height="24" data-path="icons/xds/icon-people.svg">
    게시물을 리트윗한 사용자 확인
  </Card>

  <Card title="내 게시물의 리포스트" icon="repeat">
    자신의 게시물의 리포스트 가져오기
  </Card>
</CardGroup>

***

## 엔드포인트

### Retweets 조회

| Method | Endpoint                                                      | Description             |
| :----- | :------------------------------------------------------------ | :---------------------- |
| GET    | [`/2/tweets/:id/retweeted_by`](/x-api/posts/get-reposted-by)  | 게시물을 리트윗한 사용자 가져오기      |
| GET    | [`/2/tweets/:id/quote_tweets`](/x-api/posts/get-quoted-posts) | 게시물의 quote 게시물 가져오기     |
| GET    | [`/2/users/reposts_of_me`](/x-api/users/get-reposts-of-me)    | 인증된 사용자의 게시물의 리포스트 가져오기 |

### Retweets 관리

| Method | Endpoint                                                        | Description |
| :----- | :-------------------------------------------------------------- | :---------- |
| POST   | [`/2/users/:id/retweets`](/x-api/users/repost-post)             | 게시물 리트윗     |
| DELETE | [`/2/users/:id/retweets/:tweet_id`](/x-api/users/unrepost-post) | 리트윗 취소      |

***

## 예시: 리트윗한 사용자 가져오기

```bash theme={null}
curl "https://api.x.com/2/tweets/1234567890/retweeted_by?\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

## 예시: 게시물 리트윗

```bash theme={null}
curl -X POST "https://api.x.com/2/users/123456789/retweets" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweet_id": "1234567890"}'
```

***

## 시작하기

<Note>
  **사전 요구사항**

  * 승인된 [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * Developer Console 내의 [Project와 App](/resources/fundamentals/developer-apps)
  * App의 [keys and tokens](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="조회 퀵스타트" icon="retweet" href="/x-api/posts/retweets/quickstart/retweets-lookup">
    게시물의 리트윗 가져오기
  </Card>

  <Card title="관리 퀵스타트" icon="plus" href="/x-api/posts/retweets/quickstart/manage-retweets">
    리트윗 및 리트윗 취소
  </Card>

  <Card title="내 게시물의 리포스트" icon="repeat" href="/x-api/posts/retweets/quickstart/retweets-of-me">
    자신의 게시물의 리포스트 가져오기
  </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/get-reposted-by" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
