What Happens in This Step
You get the code onto your computer and open it with Claude Code. From there, Claude Code guides you through everything — creating a Telegram bot, connecting it, and testing it. You just follow along and provide the information it asks for.
Step 1: Get the Code
There are two ways to do this. Pick whichever feels easier.
Option A: Download the ZIP
If you already have Claude Code open, this is the simplest way.
- Go to github.com/godagoo/claude-telegram-relay
- Click the green Code button, then click Download ZIP.
- Unzip the folder on your computer.
- Drag the unzipped folder into your Claude Code window. Claude Code picks it up and you are ready to go.
Option B: Clone with Git
If you are comfortable with the terminal — or if you already have Claude Code open — run these two commands:
git clone https://github.com/godagoo/claude-telegram-relay.git
cd claude-telegram-relay
The first command downloads the project to your computer. The second moves you into the project folder.
If you have Claude Code open, you can type these commands directly into Claude Code and it will execute them for you.
Why clone instead of ZIP? When you clone, you get a connection to the original repository. If new features or updates are added to the free version — which they regularly are, based on community feedback — you can pull those updates with a single command:
git pull
With the ZIP method, you would need to re-download the whole thing.
Step 2: Start the Setup
If Claude Code is not already open, start it inside the project folder:
claude
Claude Code opens and reads a file called CLAUDE.md inside the project. That file contains every setup instruction. Claude Code follows it and guides you from here.
Tell it: “Let us start the setup”
Heads up: If you just freshly installed Claude Code, it might ask you for permission before every action — “Allow Claude to run this command?” or similar. That is completely normal. Claude Code has security safeguards built in, and after a fresh install it starts cautious. This is not part of the bot setup, it is just how Claude Code works. You can adjust those permissions later, but that is beyond the scope of this course.
Step 3: Create a Bot on Telegram
Claude Code will ask you for a bot token. Here is how to get one.
- Open Telegram on your phone or computer.
- Tap the search bar at the top.
- Type BotFather and look for the one with the blue checkmark. Be careful — there are phishing accounts with similar names. Make sure it is the verified one.
- Tap Start if this is your first time, then tap Create New Bot or type
/newbotand send it. - BotFather asks for a display name. Type anything you like. Example: “Julie Bot”.
- BotFather then asks for a username. This must end with the word bot or _bot. Example:
julie_12345_bot. No spaces allowed. Underscores are fine. - Once your bot is created, click on your bot. You will see your bot token — a long string of numbers and letters separated by a colon. Copy this entire token.
Paste the token into Claude Code when it asks.
Important: Do not share your bot’s username publicly. Anyone who knows your bot’s username can find it on Telegram and message it. Claude Code sets up security so only you are authorized to use it — but still, treat the username as private.
Step 4: Get Your Telegram User ID
Claude Code also needs your personal Telegram user ID. This is a number that identifies your account. It makes sure the bot only responds to you and nobody else.
Treat your Telegram User ID like a password. If someone knows your bot username and your user ID, they can effectively chat with your AI assistant as if they were you. Never share it publicly.
- Go back to Telegram search.
- Type @userinfobot and tap the result. Be careful here — there are phishing accounts with similar names. Look for the one with the green bot icon. Do not click on lookalikes or anything that asks you to do something unexpected.
- Tap Start or send any message. Even “hi” works.
- The bot instantly replies with your user ID. It is a number like
123456789. Copy it.
Paste the user ID into Claude Code when it asks.
Step 5: Claude Code Does the Rest
Once you provide the token and user ID, Claude Code saves them in a settings file, installs the project dependencies, and runs a quick test. If everything connects, it sends a test message to your Telegram.
You do not need to edit any files. Claude Code handles the configuration.
Open Your Bot in Telegram
After Claude Code finishes the setup:
- Go to BotFather’s message where it created your bot. Tap your bot’s username — it will open a new chat with your bot.
- You will see a Start button at the bottom. Tap it.
- Pin the chat or save it so you can find it easily later. This is your AI assistant’s home.
- Send a message. Your bot should respond.
If it replies, you are done. Your AI assistant is live.
Time: About 5 minutes.