Skip to main content

Step 1: Create the Bot

1

Access Telegram Web

Go to https://web.telegram.org/ and log into your Telegram account
2

Start Chat with BotFather

Open a new chat with BotFather → https://web.telegram.org/k/#@BotFather
3

Initialize Bot Creation

  1. Click Start
  2. Type /newbot and follow the instructions in the chat
4

Get Bot Token

You’ll receive a message with the bot token. It should follow the format 12345812:AAHFfasdfasdf. Store it securely.

Example Bot Token Message

Done! Congratulations on your new bot. You will find it at t.me/testing_atai_bot.
Use this token to access the HTTP API:
796286017123123:AAHfDqivpCQXxM5SNt_BqBjNANddAdowHJASJU
Keep your token secure and store it safely, it can be used by anyone to control your bot.

Step 2: Get Your Chat ID

There are two simple ways to get your Chat ID:

Option 1: Using @WhatChatIDBot

1

Open Chat with Bot

Start a conversation with @WhatChatIDBot in Telegram
2

Get Your Chat ID

The bot will give you a number - that’s your Chat ID (e.g., 908246003)
WhatChatIDBot example showing Chat ID

Option 2: Using @RawDataBot

1

Open Chat with Bot

Start a conversation with @RawDataBot in Telegram
2

Copy the ID Field

The bot will return JSON data. Copy the id field - that’s your Chat ID
RawDataBot JSON response showing ID field

Step 3: Add Your Credentials

Now you should have both:
  • Bot Token: 796286017123123:AAHfDqivpCQXxM5SNt_BqBjNANddAdowHJASJU
  • Chat ID: 908246003

Update Application Code

Add these credentials to your application:
# Update these values in your code
BOT_TOKEN = "796286017123123:AAHfDqivpCQXxM5SNt_BqBjNANddAdowHJASJU"
CHAT_ID = "908246003"

Step 4: Test the Connection

1

Start the Application

Run the bot application: python app_telegram.py
2

Send Test Command

Send /start to your bot in Telegram
3

Verify Response

Your bot should respond with available commands and usage instructions