Step-by-Step Guide to Creating a Telegram Bot and Getting User ID & Token

📌 Step-by-Step Guide to Creating a Telegram Bot and Getting User ID & Token

To receive trade alerts via Telegram, you need:
A Telegram Bot (to send messages)
A Telegram Chat/User ID (to receive messages)
A Bot Token (to authenticate your bot)


🔹 1️⃣ Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Click on BotFather and tap Start
  3. Type /newbot and press Enter
  4. Follow BotFather’s prompts:
    • Bot Name: Any name (e.g., ExcelAlgoBot)
    • Username: Must end in _bot (e.g., excelalgo_bot)
  5. BotFather will generate an API Token
    • Example:
      kotlin
      Use this token to access the HTTP API:
      123456789:ABCdEfGhIjKlMnOpQrStUvWxYz

Save this token securely.


🔹 2️⃣ Get Your Telegram User ID

Your User ID is needed to receive bot messages.

Method 1: Using @userinfobot

  1. Open Telegram and search for @userinfobot
  2. Click Start
  3. The bot replies with your User ID
    • Example: Your Telegram ID: 987654321

Save this User ID.


🔹 3️⃣ Send a Test Message to Yourself

  1. Open your browser
  2. Type this URL, replacing BOT_TOKEN and USER_ID:
    perl
    https://api.telegram.org/bot<BOT_TOKEN>/sendMessage?chat_id=<USER_ID>&text=Hello%20from%20Excel%20Algo%20Bot!
  3. If successful, you’ll receive a “Hello from Excel Algo Bot!” message in Telegram.

🔹 4️⃣ Configure the Bot in Your Trading System

  • Enter the BOT_TOKEN and USER_ID in your telegram_credentials.json file
  • Restart the system to enable Telegram alerts

🎯 Summary

Step Action Output
1️⃣ Create Bot Use @BotFather Get Bot Token
2️⃣ Get User ID Use @userinfobot Get User ID
3️⃣ Send Test Message Use Telegram API Confirm Bot Works

🚀 Your Telegram bot is now ready to send trade alerts!
Need help integrating this into your system? Let me know! 😊


Leave a Reply

STOP LOOSING your hard earned money
Subscribe now to get free demo ID of our software.
Learn Best Intraday Trading Tricks Now !!
    Get Free Demo ID Now
    I agree with the term and condition
    Verified by MonsterInsights