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

# Retweets

> Retweeter, annuler des retweets et obtenir des informations sur les retweets

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

Les endpoints Retweets vous permettent de retweeter et d’annuler des retweets, de voir qui a retweeté une Publication et de récupérer les repartages de vos propres Publications.

<div id="overview">
  ## Vue d’ensemble
</div>

<CardGroup cols={2}>
  <Card title="Retweet" icon="retweet">
    Retweeter une Publication au nom d’un utilisateur
  </Card>

  <Card title="Annuler le retweet" icon="xmark">
    Supprimer un retweet
  </Card>

  <Card title="Utilisateurs ayant retweeté" icon="users">
    Voir qui a retweeté une Publication
  </Card>

  <Card title="Republications de mes Publications" icon="repeat">
    Récupérer les republications de vos propres Publications
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## Points de terminaison
</div>

<div id="retweets-lookup">
  ### Recherche de retweets
</div>

| Méthode | Point de terminaison                                             | Description                                                              |
| :------ | :--------------------------------------------------------------- | :----------------------------------------------------------------------- |
| GET     | [`/2/tweets/:id/retweeted_by`](/fr/x-api/posts/get-reposted-by)  | Obtenir les utilisateurs qui ont retweeté une Publication                |
| GET     | [`/2/tweets/:id/quote_tweets`](/fr/x-api/posts/get-quoted-posts) | Obtenir les Publications citées d’une Publication                        |
| GET     | [`/2/users/reposts_of_me`](/fr/x-api/users/get-reposts-of-me)    | Obtenir les republications des Publications de l’utilisateur authentifié |

<div id="manage-retweets">
  ### Gérer les retweets
</div>

| Méthode | Endpoint                                                           | Description               |
| :------ | :----------------------------------------------------------------- | :------------------------ |
| POST    | [`/2/users/:id/retweets`](/fr/x-api/users/repost-post)             | Retweeter une publication |
| DELETE  | [`/2/users/:id/retweets/:tweet_id`](/fr/x-api/users/unrepost-post) | Annuler un retweet        |

***

<div id="example-get-retweeting-users">
  ## Exemple : Obtenir les utilisateurs ayant retweeté
</div>

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

<div id="example-retweet-a-post">
  ## Exemple : retweeter une publication
</div>

```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"}'
```

***

<div id="getting-started">
  ## Pour commencer
</div>

<Note>
  **Prérequis**

  * Un [compte développeur](https://developer.x.com/en/portal/petition/essential/basic-info) approuvé
  * Un [Project et une App](/fr/resources/fundamentals/developer-apps) dans la Console de développement
  * Les [clés et jetons](/fr/resources/fundamentals/authentication) de votre App
</Note>

<CardGroup cols={2}>
  <Card title="Démarrage rapide : recherche" icon="retweet" href="/fr/x-api/posts/retweets/quickstart/retweets-lookup">
    Récupérer les retweets d’une Publication
  </Card>

  <Card title="Démarrage rapide : gestion" icon="plus" href="/fr/x-api/posts/retweets/quickstart/manage-retweets">
    Retweeter et annuler des retweets
  </Card>

  <Card title="Mes republications" icon="repeat" href="/fr/x-api/posts/retweets/quickstart/retweets-of-me">
    Récupérer les republications de vos Publications
  </Card>

  <Card title="Référence de l’API" icon="code" href="/fr/x-api/posts/retweeted-by">
    Documentation complète de l’endpoint
  </Card>
</CardGroup>
