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

# Seguimientos

> Gestiona seguimientos y obtiene información sobre seguidores y cuentas seguidas

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

Los endpoints de Follows te permiten seguir y dejar de seguir a usuarios, y obtener las listas de seguidores y seguidos de cualquier usuario.

<div id="overview">
  ## Descripción general
</div>

<CardGroup cols={2}>
  <Card title="Seguir" icon="user-plus">
    Seguir a un usuario en nombre del usuario autenticado
  </Card>

  <Card title="Dejar de seguir" icon="user-minus">
    Dejar de seguir a un usuario
  </Card>

  <Card title="Seguidores" icon="users">
    Obtener los seguidores de un usuario
  </Card>

  <Card title="Siguiendo" icon="user-group">
    Obtener a quién sigue un usuario
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## Endpoints
</div>

<div id="follows-lookup">
  ### Consulta de seguimientos
</div>

| Método | Endpoint                                                  | Descripción                          |
| :----- | :-------------------------------------------------------- | :----------------------------------- |
| GET    | [`/2/users/:id/followers`](/es/x-api/users/get-followers) | Obtener los seguidores de un usuario |
| GET    | [`/2/users/:id/following`](/es/x-api/users/get-following) | Obtener a quién sigue un usuario     |

<div id="manage-follows">
  ### Administrar seguimientos
</div>

| Método | Endpoint                                                                              | Descripción                  |
| :----- | :------------------------------------------------------------------------------------ | :--------------------------- |
| POST   | [`/2/users/:id/following`](/es/x-api/users/follow-user)                               | Seguir a un usuario          |
| DELETE | [`/2/users/:source_user_id/following/:target_user_id`](/es/x-api/users/unfollow-user) | Dejar de seguir a un usuario |

***

<div id="example-get-followers">
  ## Ejemplo: Obtener seguidores
</div>

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

<div id="example-follow-a-user">
  ## Ejemplo: seguir a un usuario
</div>

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

***

<div id="getting-started">
  ## Primeros pasos
</div>

<Note>
  **Requisitos previos**

  * Una [cuenta de desarrollador](https://developer.x.com/en/portal/petition/essential/basic-info) aprobada
  * Un [Project y App](/es/resources/fundamentals/developer-apps) en la Consola de desarrollador
  * Las [claves y tokens](/es/resources/fundamentals/authentication) de tu App
</Note>

<CardGroup cols={2}>
  <Card title="Inicio rápido" icon="rocket" href="/es/x-api/users/follows/quickstart">
    Empieza con follows
  </Card>

  <Card title="Referencia de la API" icon="code" href="/es/x-api/users/followers-lookup">
    Documentación completa del endpoint
  </Card>

  <Card title="Código de ejemplo" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    Ejemplos de código funcional
  </Card>
</CardGroup>
