A bot is a special account controlled by a program via an HTTP API. A bot has a name, an avatar and a token (just like Telegram bots). Any user can add a bot to their chat and start interacting with it through commands.
Step 1. Create a bot in the interface
Open GoMsg under your account. Go to Business → Bots. Click + or “Create bot”.
Fill in:
- Name — the bot's name (for example,
ReminderBot) - Description — what the bot does
- Avatar URL — avatar (optional)
- Visibility —
public(anyone can add it) orprivate(only you)
After creation you'll get a Bot Token — a long string like
bot_a1b2c3d4e5f6.... Save it in a safe place, you'll need it
for all API calls.
Step 2. Add the bot to a chat
For the bot to be able to reply to a user, you need to add it to a chat. Create a new chat or open an existing one, click “Add member” → select your bot.
The bot will appear in the members list with a BOT label.
Step 3. Verify the connection
A simple request to make sure the token works:
curl https://your-server.com/api/bots/<TOKEN>/me
In response you'll get JSON with info about the bot:
{
"id": "12345678-...",
"name": "ReminderBot",
"is_active": true,
"owner_id": "your-user-id"
}
Step 4. Send your first message
Use the sendMessage method:
curl -X POST https://your-server.com/api/bots/<TOKEN>/sendMessage \ -H "Content-Type: application/json" \ -d '{"chat_id": "CHAT-ID", "content": "Hello from bot!"}'
A message from the bot will appear in the chat. Congratulations — you just sent your first message through the Bot API!
Step 5. Set up the webhook
For the bot to react to user messages, you need a webhook. This is a URL on your server that GoMsg will send incoming messages to.
In the bot interface (Business → Bots → your bot), specify the Webhook URL:
https://your-bot-server.com/webhook
Every message from the chat will arrive there as a POST request:
{
"id": "msg-id",
"chat_id": "chat-id",
"sender_id": "user-id",
"sender_username": "ivan",
"content": "/help",
"message_type": "text"
}
Step 6. Bot commands
Register commands in the bot interface. For example:
/help, /remind, /status. After that
the commands will appear in autocomplete as you type.
On the webhook server side, handle the command:
if (message.content.startsWith("/help")) { sendMessage({ chat_id: message.chat_id, content: "Available commands:\n/help — help\n/remind — reminder\n/status — status" }); }
Node.js bot example
A minimal Express server for an echo bot:
const express = require("express"); const app = express(); app.use(express.json()); const TOKEN = "bot_a1b2c3..."; const SERVER = "https://your-gomsg-server.com"; app.post("/webhook", async (req, res) => { const msg = req.body; // Echo: repeat what the user wrote await fetch(`${SERVER}/api/bots/${TOKEN}/sendMessage`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ chat_id: msg.chat_id, content: `You said: ${msg.content}` }) }); res.sendStatus(200); }); app.listen(3000, () => console.log("Bot listening on :3000"));
What GoMsg bots can do
- send_message — send text, photo, voice
- edit_message — edit a message
- delete_message — delete
- append_message — append to a message (for streaming)
- reactions — add reactions
- commands — custom slash commands
- visibility — public or private
- permissions — granular rights (read, send, edit)
Bot ideas
- Reminders. A user writes “remind me to call mom in an hour” — the bot sends a reminder.
- Moderation. Deletes spam and profanity in a group chat.
- CI/CD notifications. The bot posts to a chat when a build fails on GitLab.
- Support. An auto-responder for a live chat on a website.
- Games. Text quests, quizzes, chess.
- Translator. Any message → translated into another language.
FAQ
How many bots can I create?
There is no limit. Each bot is a separate entity with its own token and owner.
How is this different from the Telegram Bot API?
The concept is the same — token + webhook + commands. But in GoMsg, bots live inside chats with regular users, without a separate bot interface. You can self-host it, with no message limits.
Do I need a public IP for the webhook?
Yes, for the webhook. An alternative is long polling (if implemented) or a test webhook right inside GoMsg (in the Bots → Test webhook section).
How do I test locally?
Use ngrok: ngrok http 3000 — you'll get a public HTTPS URL. Set it as the webhook URL in the bot settings.
What's next
The bot is created. If you want to extend its functionality — deploy your own GoMsg server for full control, or connect the bot to a chat widget on your website.