LanaChat

Create the Telegram bot of an account (BotFather, Secretary Mode, token)

9 min readUpdated Markdown

To create the Telegram bot of a LanaChat account, you send /newbot to @BotFather in Telegram, turn on the bot's Secretary Mode, then paste the token BotFather sends into LanaChat. It takes three minutes, it is free, and Telegram Premium is not required.

Each Telegram account in LanaChat answers fans through a bot of its own. You do these three steps once per bot, in step Create the bot of the Add account assistant (Studio › Telegram Accounts). Then you link the bot to the creator's Telegram account, in Telegram Business (last part of this guide).

Before you start #

  • Telegram open on a phone or a computer, on any Telegram account (yours is fine: the bot is not tied to the account that creates it).
  • In the Console: Studio › Telegram Accounts → Add account, with steps Creator and Details done. You arrive at step 3, Create the bot.
  • Access to the creator's Telegram account for the last part (the link in Telegram Business).

Step 1: create the bot with /newbot #

  1. In Telegram, search for @BotFather and open it. Check the blue tick: it is the only official one.
  2. Press Start, then send /newbot.
  3. BotFather asks for a name. This is the display name of the bot, for example *Julia Assistant*. Any text works, spaces included, and you can change it later.
  4. BotFather asks for a username. This is the bot's @, unique on all of Telegram. Its rules:
    • 5 to 32 characters: letters, digits and _ only, no spaces, no dash.
    • It must end in bot (or Bot), for example julia_it_5_bot or JuliaItBot.
    • It cannot be changed afterwards: choose one you will recognise in the list.
  5. BotFather answers *Done! Congratulations on your new bot.* with the bot's link and its token.

Tip Name the bot after the account it will run, for example julia_it_meta_5_bot for the account *Julia IT Meta Ads 5*. With several accounts, you see at a glance which bot runs which one.

The username is already taken: what now? #

BotFather answers *Sorry, this username is already taken.* Usernames are unique on all of Telegram, so add a word or a number and send again: julia_it_5_bot, then julia_it_5b_bot, and so on. If BotFather answers that the username is invalid, check that it ends in bot and uses only letters, digits and _.

In the assistant, tick the first box, then enter the username in Enter the bot username (with or without the @). The field accepts it only if it follows the rules above.

Step 2: turn on Secretary Mode (required) #

Secretary Mode is BotFather's new name for Business Mode. Without it, Telegram refuses the bot in Telegram Business and the account can never connect.

  1. In @BotFather, send /mybots.
  2. Pick the bot you just created.
  3. Press Bot Settings, then Secretary Mode, then Turn on.
  4. BotFather confirms: *Secretary Mode is currently enabled for @your_bot*.

Tick the box Turn on Secretary Mode in the assistant only once you see that sentence. The box is marked as required: Next stays locked without it.

Step 3: paste the token in LanaChat #

The token is in BotFather's *Done! Congratulations* message, after *Use this token to access the HTTP API*. It looks like 12345678:AAxxxx…: 8 to 10 digits, a colon, then 35 characters.

  1. In BotFather, tap the token to copy it whole.
  2. In the assistant, paste it into Paste the token BotFather sent.
  3. LanaChat checks it and shows *Token accepted. It is never shown again.* Press Next.

If you lost the message, send /mybots in @BotFather, pick the bot, then API Token: BotFather shows it again.

Keep the token secret #

The token is the bot's password: anyone who has it can read and send messages as the bot, so on the creator's account.

  • Paste it only into LanaChat. Never send it in a chat, an e-mail, a screenshot or a support ticket. LanaChat support never asks for it.
  • If it leaked, revoke it at once: in @BotFather send /revoke and pick the bot (or /mybots → the bot → API Token → Revoke current token). The old token stops working right away and BotFather sends a new one.
  • Then give the new token to LanaChat: in Studio › Telegram Accounts, open the row's Actions menu → Replace bot token and paste it. Only a new token of the same bot is accepted there.

Connect the bot to the creator's account #

The assistant then moves to step 4, Connect in Telegram. On the creator's Telegram account (not on the account that created the bot):

  1. Open Settings → Telegram Business → Chat Automation (on some versions, Chatbots).
  2. Add the bot by its @ (the assistant has a Copy button) and keep *All Private Chats Except…*.
  3. Under Bot permissions, turn on Manage Messages (marked Required): LanaChat cannot reply without it.
  4. Manage Profile, Manage Gifts and Stars and Manage Stories are optional, recommended. Inside Gifts and Stars, leave Transfer Stars and Transfer and Upgrade Gifts off unless you want LanaChat to move money.

The window switches to Connected as @username on its own. Press Done. The new account's AI is off: switch it on once the creator is ready. The statuses and what to do if it waits are in Connect Telegram accounts.

What are the most common mistakes? #

  • Secretary Mode forgotten: the bot cannot be added in Chat Automation, or the account stays on Waiting for Telegram. Turn it on in @BotFather (step 2), then add the bot again in Telegram.
  • Token badly pasted: *This is not a bot token: 8 to 10 digits, a colon, then 35 characters.* or *Token not accepted*. A space, a line break or a missing character is enough. Copy it again from BotFather and paste it alone.
  • Token of another bot: when you replace a token, a token of another bot is refused (*This token belongs to another bot*). Paste the new token of the same bot.
  • Bot already used by another account: the assistant shows *This bot is already in use* and offers Use it for this account too. Accept only for an account of the same creator: the Stars of both accounts land on the same bot balance. Otherwise, create a new bot with /newbot.
  • Manage Messages off: the account connects but LanaChat cannot reply. In Chat Automation, turn on Manage Messages with Reply to Messages.
  • Bot added to the wrong Telegram account: the bot must be added on the creator's account, the one fans write to. A Telegram account keeps one bot at a time: adding a new one replaces the previous one.

FAQ #

Does creating a Telegram bot cost anything? #

No. @BotFather creates bots for free, and Telegram Premium is not required to run a Secretary bot on an account.

Can I create the bot from my own Telegram account? #

Yes. The bot belongs to the Telegram account that created it in BotFather, but it can be added to any account in Telegram Business. Only the last part (Chat Automation) must be done on the creator's account.

Do I need one bot per Telegram account? #

By default, yes: one bot per account keeps the Stars of each account apart. A bot can also run several accounts of the same creator, picked behind Use an existing bot in step 3.

Can I rename the bot later? #

The name, yes: /mybots → the bot → Edit Bot → Edit Name. The username (the @) cannot be changed: create a new bot and use Change bot in the account's Edit if you need another one.

What do I do if my token leaked? #

Send /revoke to @BotFather and pick the bot: the old token stops working at once. Then paste the new one in Studio › Telegram Accounts, row Actions → Replace bot token.

Why does BotFather not show Secretary Mode? #

Update the Telegram app, then send /mybots again and open Bot Settings. On older versions the setting is still called Business Mode: turn it on, it is the same switch.

More on the Telegram accounts feature page.

Latest news about Lana on Telegram

New releases and news, first in the channel.