> For the complete documentation index, see [llms.txt](https://recursos.demandu.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://recursos.demandu.tech/crea-tu-primer-bot./crea-tu-chatbot-de-telegram.md).

# Crea tu Chatbot de Telegram

Para conectar Telegram con ***Demandu*** primero necesitamos crear el bot oficial dentro de Telegram. No te preocupes 😄 Telegram hace esto súper fácil usando una herramienta llamada ***BotFather***. Es el bot oficial para crear otros bots.

<figure><img src="/files/W7P3CPxGOKvY53H9hqNp" alt=""><figcaption></figcaption></figure>

1. #### En la barra de búsqueda superior, escribe exactamente: @BotFather (Asegúrate de seleccionar el que tiene la palomita azul de verificado ✔️).
2. #### Dale clic al botón de Iniciar (***Start***) en la parte inferior del chat.

<figure><img src="/files/OM9AsI2NQYbUzJl9rUt3" alt=""><figcaption></figcaption></figure>

3. #### 🌟 Envía el comando mágico: /***newbot*** .

<figure><img src="/files/nPghX5JxxLOqkTuh3Mty" alt=""><figcaption></figcaption></figure>

* #### 4. 📛 Bautizar a tu nuevo Asistente.
* 4.1 ***Nombre Público:*** Escribe el nombre que verán tus clientes (ejemplo: *Soporte Demandu o Mi Negocio Bot*). Presiona enviar.

<figure><img src="/files/sJ3fV2UEZ0sp6fWEFIl7" alt=""><figcaption></figcaption></figure>

* 4.2 ***Username (ID único)***: Ahora elige un nombre de usuario para buscarlo en Telegram. Condición obligatoria: Debe terminar obligatoriamente en la palabra `bot` o `_bot` (ejemplo: `DemanduSoporte_bot` o `PlataformaDemanduBot`).

<figure><img src="/files/Iwg9XzJMnz5G7WZRiiTl" alt=""><figcaption></figcaption></figure>

#### 🔑 *5. Guardar el Token API (Tu Llave Maestra)*

Si todo salió bien, BotFather te enviará un mensaje de felicitación. 🥳

1. Dentro de ese mensaje, busca un código largo de letras y números conocido como HTTP API Token (se ve parecido a esto: `123456789:ABCdefGhIJKlmNo`).
2. Copia ese código por completo. 🪙 ¡Esta es la llave maestra que le permitirá a Demandu controlar el bot!

<figure><img src="/files/zcsO8ZjOXJs2Nrr9ChO9" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="lightbulb-on" %}

## [*<mark style="color:blue;">**Tip Demandu**</mark>*<mark style="color:blue;">: ¡Guarda este código! El</mark> <mark style="color:blue;"></mark>*<mark style="color:blue;">Token API</mark>* <mark style="color:blue;"></mark><mark style="color:blue;">funciona como la</mark> <mark style="color:blue;"></mark>*<mark style="color:blue;">contraseña maestra</mark>* <mark style="color:blue;"></mark><mark style="color:blue;">de tu bot. No lo compartas en canales públicos para evitar que personas ajenas controlen tus flujos de comunicación.</mark>](#user-content-fn-1)[^1]&#x20;

{% endhint %}

6. #### Entra a tu plataforma Demandu y da "*clic*" en el botón "***Crear nuevo chatbot***".

<figure><img src="/files/n95xBMhbhUky9ksadaEI" alt=""><figcaption></figcaption></figure>

7. #### Selecciona la opción "Telegram".

<figure><img src="/files/qPDa7D7NQ5rFXE6UqWaD" alt=""><figcaption></figcaption></figure>

#### 8. Selecciona el objetivo comercial de tu bot.

8.1 Procede al siguiente paso

<figure><img src="/files/yTJUe2hsh0WDpDjXh57A" alt=""><figcaption></figcaption></figure>

#### 9. Introduce el número de tu teléfono móvil de Telegram registrado y has "clic" en conectar.

<figure><img src="/files/zRbKANZhLUXK8mCAec4e" alt=""><figcaption></figcaption></figure>

#### 10. Recibirás un Código de inicio de sesión en tu cuenta de Telegram.

<figure><img src="/files/cSApdNnjblac3sxkR4ZG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Ci0xJJyWRNWyIq3Xux0G" alt=""><figcaption></figcaption></figure>

Introduce el ***código de inicio de sesión*** aquí y haz clic en "***Conecte manualmente su bot***"

<figure><img src="/files/WO9NzjBkdVRCuDrI0RnY" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="lightbulb-on" %}
*<mark style="color:blue;">**Tip Demandu**</mark>*<mark style="color:blue;">: Puede hacer clic en</mark> <mark style="color:blue;"></mark>*<mark style="color:blue;">`reenviar`</mark>* <mark style="color:blue;"></mark><mark style="color:blue;">código en caso de que no lo haya recibido. Si aún no ha recibido el código de inicio de sesión, por favor verifica el número de móvil de Telegram y vuelve a introducirlo haciendo clic en</mark> <mark style="color:blue;"></mark>*<mark style="color:blue;">`Cambiar número`</mark>*<mark style="color:blue;">.</mark>
{% endhint %}

#### 11. Conecta con tu cuenta existente de Telegram.

Ahora para conectar con una cuenta existente, debes proporcionar los mismos nombres que usaste al crear el bot usando ***@BotFather***, junto con el token generado en el paso 5.

<figure><img src="/files/D06fL4j6JOGRicevOX2w" alt=""><figcaption></figcaption></figure>

## 🎉¡Felicidades! 🎉 ya esta todo listo para hacer tu bot de *Telegram* en ***Demandu***.

<figure><img src="/files/COg5qWHq0DCaeo1dgcDB" alt=""><figcaption></figcaption></figure>

[^1]:
