In Ukraine, work correspondence has long lived in Telegram. Recruiters, salespeople, support — everyone writes to clients and candidates from their own account, not from a corporate bot. When we were building an AI agent that reads a recruiter's correspondence with candidates and manages their cards in the CRM itself, the first question was not "which model to use," but "how to legally connect to this correspondence at all." I'm sharing what we found out.
Two ways to connect
Bot API. You create a bot via @BotFather, get a token, and work through a simple HTTP API. This is the official, documented, and safest path. But the bot only sees the messages that were written to it directly or in a group where it was added. The bot does not see the recruiter's personal correspondence with the candidate at all.
Client API (MTProto). This is the same protocol through which official Telegram apps operate. You register your application on my.telegram.org, receive an api_id and api_hash, and the user logs into their account through your application — phone number, code, and if needed, the two-factor authentication password. After that, the application sees the same thing as the user in a regular client.
If the task is to work with a person's private chats, there is no other option. That is precisely why all services that "read your Telegram" work through the client API.
What the rules say
Telegram has separate API terms of use (core.telegram.org/api/terms). Before building a product on this, they should be read in full, not just the first paragraph. A few points that directly concern business automation:
Transparency. The user should understand that the app works through the Telegram API and see this in the product description. We added such a note on the website and in the integration settings.
Do not impersonate the official client. The name and logo must not mislead into thinking that this is an app from Telegram.
User data security. An account session should be stored as carefully as a password: encrypted, with the ability to log out with one click.
AI. A separate clause restricts the use of data obtained through the Telegram API for training and developing artificial intelligence models. We interpret this conservatively: we do not train models on user correspondence, messages are processed only for the action the user themselves requests, and are not stored longer than necessary. The wording in the rules is broad, so if your product is built on AI, read this section carefully and have a plan B in place.
Technical limits that are easy to run into
Flood wait. Telegram limits the request rate and responds with a FLOOD_WAIT error indicating the number of seconds to wait. Mass requests such as "go through all dialogs and download history" must be done slowly, with pauses and a queue.
Do not mark messages as read. If the app reads the chat and triggers a read receipt, the interlocutor will see two checkmarks, even though the person has not yet seen the message. For a work tool, this is unacceptable, so we read the history without this call.
Voice messages. Voice transcription is built into Telegram Premium. Without Premium, you'll have to download the voice message and recognize it yourself via speech-to-text — and keep in mind that this is another personal data processor.
Personal versus work. A person connects an account that contains both work and personal chats. The app must distinguish between them and not intrude where there is no work context. We recommend connecting a separate work account and have added this to the instructions.
Conclusion
Telegram provides everything to automate work with personal chats, but responsibility for what your application does on behalf of a person lies with you. The Bot API — for everything that can be done by a bot. The client API — only when personal chats cannot be avoided, with a transparent description for the user, an encrypted session, respect for limits, and a conservative attitude toward AI.
