> 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/centro-de-recursos-pt-br/crie-seu-primeiro-bot/crie-seu-chatbot-do-telegram.md).

# Crie seu Chatbot do Telegram

Para conectar o Telegram com ***Demandu*** primeiro precisamos criar o bot oficial dentro do Telegram. Não se preocupe 😄 O Telegram torna isso super fácil usando uma ferramenta chamada ***BotFather***. É o bot oficial para criar outros bots.

<figure><img src="/files/6c39e16f00f1b293b9afe6751601c620a9ab7205" alt=""><figcaption></figcaption></figure>

1. #### Na barra de pesquisa superior, digite exatamente: @BotFather (certifique-se de selecionar o que tem o visto azul de verificado ✔️).
2. #### Clique no botão Iniciar (***Start***) na parte inferior do chat.

<figure><img src="/files/575ee8548885ac1563f98f523bc0b12bc79933a0" alt=""><figcaption></figcaption></figure>

3. #### 🌟 Envie o comando mágico: /***newbot*** .

<figure><img src="/files/94c58a01245b9a5ae06690ef9498fdb09efe36fa" alt=""><figcaption></figcaption></figure>

* #### 4. 📛 Batizar o seu novo Assistente.
* 4.1 ***Nome público:*** Digite o nome que seus clientes verão (exemplo: *Suporte Demandu ou Meu Negócio Bot*). Pressione enviar.

<figure><img src="/files/47c6223ae4696cb6ad3c3598728d8d5af80c89db" alt=""><figcaption></figcaption></figure>

* 4.2 ***Nome de usuário (ID único)***: Agora escolha um nome de usuário para encontrá-lo no Telegram. Condição obrigatória: Ele deve terminar obrigatoriamente na palavra `bot` ou `_bot` (exemplo: `DemanduSoporte_bot` ou `PlataformaDemanduBot`).

<figure><img src="/files/9eb28e81520ec4048b23c60e9eef6ebceb2d1d7f" alt=""><figcaption></figcaption></figure>

#### 🔑 *5. Salvar o Token da API (Sua chave mestra)*

Se tudo deu certo, o BotFather enviará uma mensagem de parabéns para você. 🥳

1. Dentro dessa mensagem, procure um código longo de letras e números conhecido como HTTP API Token (ele se parece com isto: `123456789:ABCdefGhIJKlmNo`).
2. Copie esse código por completo. 🪙 Esta é a chave mestra que permitirá ao Demandu controlar o bot!

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

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

## [*<mark style="color:azul;">**Dica Demandu**</mark>*<mark style="color:azul;">: Guarde este código! O</mark> <mark style="color:azul;"></mark>*<mark style="color:azul;">Token da API</mark>* <mark style="color:azul;"></mark><mark style="color:azul;">funciona como a</mark> <mark style="color:azul;"></mark>*<mark style="color:azul;">senha mestra</mark>* <mark style="color:azul;"></mark><mark style="color:azul;">do seu bot. Não o compartilhe em canais públicos para evitar que pessoas de fora controlem seus fluxos de comunicação.</mark>](#user-content-fn-1)[^1]&#x20;

{% endhint %}

6. #### Entre na sua plataforma Demandu e clique em "*clique*" no botão "***Criar novo chatbot***".

<figure><img src="/files/79ce564b9391c0ff3e47bddbac07f172e2336398" alt=""><figcaption></figcaption></figure>

7. #### Selecione a opção "Telegram".

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

#### 8. Selecione o objetivo comercial do seu bot.

8.1 Prossiga para a próxima etapa

<figure><img src="/files/7f296b4ec48e220465f2b0ec686f01cd922b90a4" alt=""><figcaption></figcaption></figure>

#### 9. Insira o número do seu celular do Telegram cadastrado e clique em conectar.

<figure><img src="/files/00c59ba067b5070a48aa0b6eb4264ceb5f5e1e08" alt=""><figcaption></figcaption></figure>

#### 10. Você receberá um código de login na sua conta do Telegram.

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

<figure><img src="/files/2ec8de57f121f091a012b9e0b0b45b45f91d58f8" alt=""><figcaption></figcaption></figure>

Insira o ***código de login*** aqui e clique em "***Conecte manualmente seu bot***"

<figure><img src="/files/72bcb9c209c94bbcea321809fc6a4f0835ea223b" alt=""><figcaption></figcaption></figure>

{% hint style="info" icon="lightbulb-on" %}
*<mark style="color:azul;">**Dica Demandu**</mark>*<mark style="color:azul;">: Você pode clicar em</mark> <mark style="color:azul;"></mark>*<mark style="color:azul;">`reenviar`</mark>* <mark style="color:azul;"></mark><mark style="color:azul;">o código caso não o tenha recebido. Se ainda não tiver recebido o código de login, por favor verifique o número de celular do Telegram e digite-o novamente clicando em</mark> <mark style="color:azul;"></mark>*<mark style="color:azul;">`Alterar número`</mark>*<mark style="color:azul;">.</mark>
{% endhint %}

#### 11. Conecte-se com sua conta existente do Telegram.

Agora, para se conectar com uma conta existente, você deve fornecer os mesmos nomes que usou ao criar o bot usando ***@BotFather***, junto com o token gerado na etapa 5.

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

## 🎉Parabéns! 🎉 já está tudo pronto para criar seu bot de *Telegram* em ***Demandu***.

<figure><img src="/files/4c3ccce8b2d3a242967ab6dc3e5040581a764d65" alt=""><figcaption></figcaption></figure>

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://recursos.demandu.tech/centro-de-recursos-pt-br/crie-seu-primeiro-bot/crie-seu-chatbot-do-telegram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
