---
title: "How to Create and Connect a Telegram Bot to Loyally"
description: "Create your own Telegram Bot and connect it to Loyally to send automated loyalty messages and updates"
url: https://help.loyally.ai/en/articles/114-how-to-create-and-connect-a-telegram-bot-to-loyally
collection: "Telegram"
updated: 2026-04-11
language: en
---

# How to Create and Connect a Telegram Bot to Loyally

Create your own Telegram Bot and connect it to Loyally to send automated loyalty messages and updates

## 💬 How to Create a Telegram Bot

You can create a **Telegram Bot** to send automated loyalty messages, updates, and notifications to your customers directly in Telegram. Follow these steps to create and connect your bot with Loyally.

* * *

### 🧩 Step 1. Find BotFather

1.  Open the **Telegram** app (mobile or desktop).
    
2.  Search for **@BotFather** — this is the official Telegram bot used to create and manage other bots.
    
3.  Open the chat with **BotFather**.
    

![](https://staticfiles.gleap.io/ghelparticle/w4hMiXUhU9qDKzsUoDSBaRDqEl7u48ghgM88wsGGEnmscGlWt6YTGzfFJvaC4p79N967RyzbJkQ.png)

* * *

### ⚙ Step 2. Start the Creation Process

1.  In your BotFather chat, type the command:
    
    ```javascript
    /start
    ```
    
2.  Then create a new bot by sending:
    
    ```javascript
    /newbot
    ```
    
3.  BotFather will guide you through the setup process.
    

![](https://staticfiles.gleap.io/ghelparticle/Da84gcfPMhskaRDqFHdvNozSPYtR0tR4mq9JGF7pAELUdIpyVlCiev9HXDdFVeql1TIKynJ7742.png)

* * *

### 🧱 Step 3. Choose a Name and Username

1.  **Enter a name** for your bot — this is the display name users will see (you can change it later).  
    Example: `Loyally Rewards Assistant`
    
2.  **Enter a username** for your bot — this must be unique and must end with “bot”.  
    Example: `LoyallyRewardsBot` or `MyStore_bot`
    

* * *

### 🔑 Step 4. Get the API Token

After you finish the setup, BotFather will send you a message that includes your **API Token**.

![](https://staticfiles.gleap.io/ghelparticle/i5vQEEmZzWJvUL9ilXVlljtiaedhupVGqP7WLuHNDIYFjB9SooWNQteszOdfKU4Qo8kbtmJWOB5.png)

This token allows you to connect your Telegram bot to Loyally.  
Keep it private — anyone with this token can control your bot.

> **Warning:** _Important:_ Never share your bot token publicly. If it’s ever compromised, revoke it immediately using `/revoke` in BotFather.

* * *

### 🔗 Step 5. Connect the Bot to Loyally

1.  Log in to your **Loyally Dashboard**.
    
2.  Navigate to **Settings → Services**.
    
3.  Click **Connect Telegram Bot**.
    
4.  Paste the **API Token** you received from BotFather.
    
5.  Click **Connect** to link the bot.
    

![](https://staticfiles.gleap.io/ghelparticle/GDXCjBhzPLX5rugpBNCfCmsJC1EOaU8UwloB6AIpB2ef5bgPe8yxXk1PteXrUhacFzcShaLxvCq.png)

✅ Once connected, your Telegram Bot will appear as “Connected” in the settings page.  
You can now use it for **Automations**, **Campaigns**, and **Customer Notifications** inside Loyally.

* * *

### 🧠 Summary

You’ve successfully created and connected a **Telegram Bot** with Loyally.  
Your bot can now automatically send loyalty updates, reminders, and promotional messages to your customers directly in Telegram.

> **Error:** **Avoid Spamming**: Telegram has strict anti-spam filters. If too many users "Block" or "Report" your bot, Telegram may disable it. Space out your campaigns and ensure the content is always relevant.

* * *

### 🛠 Telegram Integration: Troubleshooting & Best Practices

<table data-id="3e2644a3-b948-4ef5-ad8c-b6147cd48e21" style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><td colspan="1" rowspan="1"><p data-id="1474691f-2ade-4a47-a593-6d53b3a80a02"><strong>Error</strong></p></td><td colspan="1" rowspan="1"><p data-id="4949ed42-e22e-434c-b44e-89c715fe4620"><strong>Cause</strong></p></td><td colspan="1" rowspan="1"><p data-id="77184845-a52f-47ca-a233-5908934e4d6d"><strong>Workaround</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="d9914ed4-f287-4d34-955b-aff7a2a2b839">Invalid Token</p></td><td colspan="1" rowspan="1"><p data-id="b9140132-9433-42a5-9742-69bef5e9df4d">Extra spaces in the text or using an expired/revoked API key.</p></td><td colspan="1" rowspan="1"><p data-id="30a728e4-26fe-4879-b326-3b3ee69cda2e">Carefully copy the full string from BotFather and ensure no spaces are included at the start or end.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="1d358b32-6577-4ed4-929b-8a1099b4ae18">Bot Not Sending Messages</p></td><td colspan="1" rowspan="1"><p data-id="89ecccab-14a1-4639-bde1-e52a773ec020">The customer has not yet initiated a conversation with the bot.</p></td><td colspan="1" rowspan="1"><p data-id="3462b033-ba2c-41c1-b6a5-b34a712b2fc7">Telegram requires users to click <strong>Start</strong> in the chat first. Include a direct link to your bot in your marketing materials.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="15f16b12-475c-4e6c-b4f1-98460e33e40e">Username Unavailable</p></td><td colspan="1" rowspan="1"><p data-id="7547dc02-66ba-4d63-8578-4db66ece10c5">The chosen username is already being used by another Telegram user or bot.</p></td><td colspan="1" rowspan="1"><p data-id="5d89dabd-e196-427f-8a4d-4b5eee9bb287">Usernames must be globally unique. Try adding your brand’s location or a specific suffix like <code>_rewards_bot</code>.</p></td></tr><tr><td colspan="1" rowspan="1"><p data-id="d5773e80-ede5-4401-9bd2-a205b8866b19">Connection Failed</p></td><td colspan="1" rowspan="1"><p data-id="f76f460d-5a91-4236-b64c-801ba2b1a78d">Temporary server timeout between Loyally and Telegram.</p></td><td colspan="1" rowspan="1"><p data-id="99aacb87-693a-412f-a551-40fa144c0f34">Refresh your Loyally dashboard and attempt to paste the token again after 60 seconds.</p></td></tr></tbody></table>

* * *

## Related Articles

[

Integrations

See how the integrations work

](https://help.loyally.ai/en/articles/29-integrations.md)[

How to Connect WhatsApp to Loyally

Integrate WhatsApp with Loyally to send automated messages, updates, and promotions directly to your customers — using one of the world’s most popular messaging platforms.

](https://help.loyally.ai/en/articles/112-how-to-connect-whatsapp-to-loyally.md)
