# Generar un token de API de GitLab

Si su GitLab es autohospedado o simplemente prefiere conectarse usando un token, primero necesitará un token de acceso:

1. En GitLab, navegue a [Tokens de acceso](https://gitlab.com/-/user_settings/personal_access_tokens) en la configuración de su Usuario y haga clic en **Agregar nuevo token.**<br>

   <figure><img src="/files/e4066c4fa0976d57c449516085439abd35ed3d02" alt="" width="375"><figcaption></figcaption></figure>
2. Introduzca un **Nombre del token** y la **Fecha de caducidad** (típicamente un año desde la creación del token)**.**&#x20;
3. Bajo **Seleccione ámbitos**, selecciona `api` o `read_api` .
4. Haga clic en **Crear token,** luego copie el token que aparece.\ <br>

   <figure><img src="/files/5c00318f55312d684739229efa2d934c1f36c340" alt="" width="375"><figcaption></figcaption></figure>
5. De vuelta en Violet, vaya a Aplicaciones y seleccione <img src="/files/ec01e93fcb3b3252bad8adc90ebdc51a8f3e7208" alt="" data-size="line"> **Gitlab**. Cree una nueva conexión y active **Mostrar otras opciones de autenticación**. Ingrese su token y haga clic en **Conectar con token API.**

<figure><img src="/files/0adba2cfb90d828e46984d1220902d8fb6660883" alt="" width="188"><figcaption></figcaption></figure>

6. Una vez conectado, configure su integración y luego haga clic **Crear.** ¡Listo!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.violetlabs.com/es/aplicaciones/g/gitlab/generar-un-token-de-api-de-gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
