Introduction
This tutorial guides you through creating and configuring a Telegram bot in OpenClaw Manager. Once complete, your Telegram Bot will be powered by APIMart’s AI models for intelligent conversations.Prerequisites: Please ensure you have completed the OpenClaw Manager deployment and the Manager is running with the management UI accessible.
Step 1: Create a Bot on Telegram
- Open Telegram, search for @BotFather and start a conversation

- Send the
/newbotcommand

- Enter your bot’s display name as prompted (e.g.
My AI Bot)

- Enter the bot’s username (must end with
bot, e.g.my_ai_chatbot)

- BotFather will return a Bot Token (format:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11), copy and save it

Step 2: Create Instance in Manager
-
Open the OpenClaw Manager UI (
http://127.0.0.1:51942) - Click + New Instance

- Enter instance name — e.g.
my-telegram-bot(letters, numbers, underscores, hyphens only)

- Select AI model — Choose the model you want to use

- Enter APIMart API Key — Enter your API key starting with
sk-

- Select channel — Choose Telegram
- Paste Bot Token — Paste the Bot Token obtained in Step 1

- Click Create to complete instance creation
Step 3: Pairing Code Binding
After the instance is created and started, complete user authorization via pairing code:- Search for your bot’s username in Telegram
- Send any message (e.g. “Hello”)
-
The bot will reply with an 8-digit pairing code (e.g.
DFE62DTD)

- Return to the Manager’s new instance wizard, enter the pairing code in the “Enter Pairing Code” step and click “Approve”

- After the code is approved, click “Done”

- Return to Telegram, send another message, and the bot will respond with AI-generated content

Tip: Pairing codes are stored in Gateway memory and expire after Gateway restart. If a code expires, simply have the user send a new message to get a fresh code.
FAQ
Q1: Bot created successfully but not responding?
Solutions:- Confirm the instance status is “Running” in Manager
- Confirm Bot Token is entered correctly
- Check Gateway logs:
~/.openclaw-<instance-name>/logs/gateway.log
Q2: Pairing code approval failed?
Solutions:- Confirm Gateway is running
- Pairing codes are case-sensitive, double check carefully
- Codes expire after Gateway restart, have the user send a new message
Back to OpenClaw Manager Deployment Guide
View the complete guide for Manager installation, deployment and instance management