> ## 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 de mis Publicaciones

> Obtén tus Publicaciones que han sido retuiteadas

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

Esta guía te muestra cómo obtener tus Publicaciones que han sido Retwitteadas por otras personas.

<Note>
  **Requisitos previos**

  Antes de comenzar, necesitarás:

  * Una [cuenta de desarrollador](https://developer.x.com/en/portal/petition/essential/basic-info) con una App aprobada
  * Un token de acceso de usuario (OAuth 1.0a o OAuth 2.0 PKCE)
</Note>

***

<div id="why-use-retweets-of-me">
  ## ¿Por qué usar Retweets of Me?
</div>

El endpoint Retweets of Me te ayuda a:

* **Hacer un seguimiento de la interacción** — Ver qué Publicaciones tuyas se comparten
* **Comprender la resonancia** — Saber qué contenido resuena entre tu audiencia
* **Orientar tu estrategia** — Ajustar tu estrategia de contenido en función de los patrones de cómo se comparte

***

<div id="get-your-retweeted-posts">
  ## Obtén tus Publicaciones retuiteadas
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/users/reposts_of_me?\
  tweet.fields=created_at,public_metrics&\
  max_results=10" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python Python SDK theme={null}
  from xdk import Client

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # Obtén tus Publicaciones que fueron retuiteadas
  for page in client.posts.get_reposts_of_me(
      tweet_fields=["created_at", "public_metrics"],
      max_results=10
  ):
      for post in page.data:
          print(f"{post.text[:50]}... - Retweets: {post.public_metrics.retweet_count}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client } from "@xdevplatform/xdk";

  const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

  // Obtén tus Publicaciones que fueron retuiteadas
  const paginator = client.posts.getRepostsOfMe({
    tweetFields: ["created_at", "public_metrics"],
    maxResults: 10,
  });

  for await (const page of paginator) {
    page.data?.forEach((post) => {
      console.log(`${post.text?.slice(0, 50)}... - Retweets: ${post.public_metrics?.retweet_count}`);
    });
  }
  ```
</CodeGroup>

***

<div id="response">
  ## Respuesta
</div>

```json theme={null}
{
  "data": [
    {
      "id": "1848781937210802364",
      "text": "ever wanted to discover trends.. before they're trends?...",
      "created_at": "2024-01-15T10:30:00.000Z",
      "public_metrics": {
        "retweet_count": 42,
        "reply_count": 5,
        "like_count": 156,
        "quote_count": 8
      },
      "edit_history_tweet_ids": ["1848781937210802364"]
    },
    {
      "id": "1847990559081648620",
      "text": "posting is just journaling with an audience",
      "created_at": "2024-01-14T15:20:00.000Z",
      "public_metrics": {
        "retweet_count": 28,
        "reply_count": 12,
        "like_count": 89,
        "quote_count": 3
      },
      "edit_history_tweet_ids": ["1847990559081648620"]
    }
  ],
  "meta": {
    "result_count": 2,
    "next_token": "7140dibdnow9c7btw481s8m561gat797rboud5r80xvzm"
  }
}
```

***

<div id="filter-by-time-range">
  ## Filtrar por intervalo de tiempo
</div>

Obtén publicaciones retuiteadas de un período específico:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl "https://api.x.com/2/users/reposts_of_me?\
  start_time=2024-01-01T00%3A00%3A00Z&\
  end_time=2024-01-31T23%3A59%3A59Z&\
  tweet.fields=created_at,public_metrics" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN"
  ```

  ```python Python SDK theme={null}
  from xdk import Client

  client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")

  # Obtén publicaciones retuiteadas de un intervalo de tiempo
  for page in client.posts.get_reposts_of_me(
      start_time="2024-01-01T00:00:00Z",
      end_time="2024-01-31T23:59:59Z",
      tweet_fields=["created_at", "public_metrics"]
  ):
      for post in page.data:
          print(f"{post.created_at}: {post.text[:50]}...")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client } from "@xdevplatform/xdk";

  const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });

  // Obtén publicaciones retuiteadas de un intervalo de tiempo
  const paginator = client.posts.getRepostsOfMe({
    startTime: "2024-01-01T00:00:00Z",
    endTime: "2024-01-31T23:59:59Z",
    tweetFields: ["created_at", "public_metrics"],
  });

  for await (const page of paginator) {
    page.data?.forEach((post) => {
      console.log(`${post.created_at}: ${post.text?.slice(0, 50)}...`);
    });
  }
  ```
</CodeGroup>

***

<div id="common-parameters">
  ## Parámetros comunes
</div>

| Parámetro          | Descripción                                               | Valor predeterminado |
| :----------------- | :-------------------------------------------------------- | :------------------- |
| `max_results`      | Resultados por página (1-100)                             | 10                   |
| `start_time`       | Marca de tiempo de la Publicación más antigua (ISO 8601)  | —                    |
| `end_time`         | Marca de tiempo de la Publicación más reciente (ISO 8601) | —                    |
| `pagination_token` | Token para la siguiente página                            | —                    |
| `tweet.fields`     | Campos adicionales de las Publicaciones                   | `id`, `text`         |

***

<div id="next-steps">
  ## Próximos pasos
</div>

<CardGroup cols={2}>
  <Card title="Búsqueda de Retweets" icon="retweet" href="/es/x-api/posts/retweets/quickstart/retweets-lookup">
    Consulta quién hizo Retweet de una Publicación
  </Card>

  <Card title="Administrar Retweets" icon="share" href="/es/x-api/posts/retweets/quickstart/manage-retweets">
    Haz Retweet y anula Retweets
  </Card>

  <Card title="Referencia de la API" icon="code" href="/es/x-api/posts/reposts-of-me">
    Documentación completa del endpoint
  </Card>
</CardGroup>
