Telegram Assistant Connection

Automate your personal Telegram account using the MTProto 2.0 protocol — the same protocol used by official Telegram apps. Send messages, read chat history, manage contacts — as if you were doing it manually.


What is MTProto 2.0?

MTProto 2.0 is Telegram's encrypted communication protocol. Unlike the Bot API (which goes through Telegram's HTTP servers), MTProto connects directly to Telegram's infrastructure — just like the official Telegram Desktop or mobile app.

Bot APIMTProto 2.0 (Assistant)
Account typeBot accountYour personal account
ConnectionHTTP requests to api.telegram.orgDirect encrypted TCP connection
EncryptionTLS (HTTPS)AES-256-IGE + SHA-256 (end-to-end)
SpeedPolling or webhook delayReal-time updates
CapabilitiesLimited to bot permissionsFull user capabilities
Rate limitsBot-specific limitsUser-level limits
SessionStateless (token)Persistent session (like a logged-in app)

How Fainflow uses MTProto 2.0

  • Layer 158 — latest Telegram API schema
  • AES-256-IGE encryption with SHA-256 key derivation
  • Persistent sessions — stored encrypted, no need to re-authenticate
  • Transport obfuscation — connections look like regular HTTPS traffic
  • Sessions appear as "Fainflow Server" in Telegram → Settings → Active Sessions

Setup (5 steps)

New Connection — Telegram Assistant

1
2
3
4
5
1API Credentials

Get your API ID and Hash from my.telegram.org

Name
API ID
API Hash
2Phone Number

Enter your Telegram phone number with country code

Phone
3Confirmation Code

Enter the code sent to your Telegram app

Code

Check your Telegram app for the login code

42FA Password

If you have two-factor authentication enabled

Password

Skip this step if you don't have 2FA

5Done!

Your Telegram account is connected. Sessions appear as 'Fainflow Server' in Active Sessions.

Step 1: Get API Credentials

  1. Go to my.telegram.org
  2. Log in with your phone number
  3. Click API development tools
  4. Create a new application
  5. Copy your API ID (number) and API Hash (string)

You only need to do this once. The same api_id/api_hash can be used for multiple connections.

Step 2: Sign in with a QR code

The wizard shows a QR code. On your phone open Telegram → Settings → Devices → Link Desktop Device and point the camera at the code. Your phone approves the login — no code to type. The QR refreshes itself every ~30 seconds while you wait.

Telegram no longer delivers login codes reliably to third-party apps like Fainflow, so QR is the default. If you cannot scan (for example the browser is on the same phone), use Use a phone code instead: enter your number with the country code (e.g. +380501234567) and Telegram sends the code to your other signed-in devices — not by SMS.

Step 3: Confirmation Code (phone-code path only)

If you chose the phone code, enter the login code from your Telegram app here. With QR this step is skipped.

Step 4: 2FA Password (if enabled)

If you have Two-Factor Authentication enabled on your Telegram account, enter your cloud password. If not — this step is skipped automatically.

Step 5: Done

Your account is connected! The session is stored encrypted and persists across restarts.


Event: Telegram Update

Triggers on any update from your personal account — messages, edits, reactions, etc.

Outputs

OutputTypeDescription
messagestringMessage text content
datenumberUnix timestamp
userIDstringSender's Telegram user ID
userNamestringSender's @username
firstNamestringSender's first name
lastNamestringSender's last name
RAWjsonFull raw MTProto update object (all fields)

The RAW output contains the complete Telegram update — use JSON Parse + Object Get to extract any field (chat ID, media, reply info, etc.).


Available Actions

See Telegram Assistant Actions for the complete list of 14 actions:

CategoryActions
MessagingSend, Edit, Delete, Forward
MediaSend Photo, Send Document
ChatGet Chat Info, Get History, Search, Mark as Read, Pin/Unpin
UsersGet User Info, Get Contacts

Security & Privacy

  • Your api_id and api_hash are stored encrypted in the database
  • MTProto sessions are encrypted with AES-256-GCM
  • Fainflow never sees your Telegram password — it's used only during the sign-in step
  • You can revoke the session anytime: Telegram → Settings → Active Sessions → terminate "Fainflow Server"

Important Notes

  • This uses your personal account, not a bot
  • Telegram may rate-limit aggressive automation — add Wait For blocks between actions
  • Each connection = one MTProto session = one active session in Telegram
  • Don't run too many parallel requests — Telegram can temporarily restrict your account
  • If you see FLOOD_WAIT_X errors, the flow pauses automatically