# Telegram bots

> Connect a Telegram bot you made with BotFather. People who message it edit video in the chat with no Vidmoat account. You decide who may use it, what it can do and what it may spend; every credit comes out of your balance.

Your bot keeps its own name and photo and speaks as itself. Behind it runs the same editing agent as Vidmoat's own bot, limited to editing tools, and everything it does is billed to your app at normal prices.

## Set it up

### Step 1: Create the bot

In Telegram, open [@BotFather](https://t.me/BotFather), send `/newbot`, and choose the bot's name and photo. Those stay yours.

### Step 2: Paste the token

In the console, open your app, then the [Telegram tab](https://developer.vidmoat.com/developer/apps), and paste the token BotFather gave you.

### Step 3: Try it

We check the token with Telegram (`getMe`), show the bot's @username, and point the bot at a webhook for this app with a random secret. Message the bot to try it.

> **Note.** Connecting needs the same standing as a live API key: an accepted developer agreement, an app approved in review, and a plan with live API access. A bot spends real credits on real people.

The token is stored encrypted and is never shown again; the console shows the @username and the token's last four characters. Every update must carry the webhook secret, and an update Telegram retries is recognised by its id and never runs or bills twice. Disconnecting deletes the webhook, cancels queued work and forgets the token. Revoking the token in BotFather also stops the bot.

If we suspend the app, the bot answers one fixed line and does nothing billed.

- [Access, features and limits](https://developer.vidmoat.com/developer/docs/telegram/access): Who can use it, what it can do, and what it may spend.
- [Your bot's words](https://developer.vidmoat.com/developer/docs/telegram/behaviour): Instructions, welcome and help text, support contact, your own plugins.
- [Managing people](https://developer.vidmoat.com/developer/docs/telegram/users): Block, limit and allow people, in the console or from your server.
- [Sell access](https://developer.vidmoat.com/developer/docs/telegram/selling-access): Three patterns that work with your own checkout.
- [Support your users](https://developer.vidmoat.com/developer/docs/telegram/support): Where to look when somebody says the bot is not working.
- [Webhooks and data](https://developer.vidmoat.com/developer/docs/telegram/webhooks-and-data): Events for your systems, and what happens to your users' data.

---

Source: https://developer.vidmoat.com/developer/docs/telegram
Previous: [Update a bot user](https://developer.vidmoat.com/developer/docs/api/telegram-users/update-telegram-user.md)
Next: [Access, features and limits](https://developer.vidmoat.com/developer/docs/telegram/access.md)
All documentation: https://developer.vidmoat.com/llms-full.txt
