AACFlow

Telegram MTProto

Interact with Telegram via the MTProto protocol — send messages, fetch chat history, list dialogs

te

Telegram MTProto is the native protocol powering the Telegram platform, offering lower-level access compared to the Bot API. It allows reading message history from regular accounts, listing all accessible dialogs, and sending messages programmatically.

With the Telegram MTProto integration in AACFlow, you can:

  • Send messages: Dispatch text messages to any chat, group, or channel accessible to the account
  • Get history: Retrieve the message history of a conversation
  • List dialogs: Enumerate all dialogs (chats, groups, channels) available to the authenticated account

This integration is ideal for automation scenarios that require access beyond the Bot API scope, such as reading existing conversations or working with personal Telegram accounts.

Usage Instructions

Integrate Telegram MTProto into the workflow. Requires API ID and API Hash from my.telegram.org, and a session string for user account access (or a Bot Token for Bot API fallback).

Tools

telegram_mtproto_send_message

Send a message to a Telegram chat

Input

ParameterTypeRequiredDescription
apiIdstringYesAPI ID from my.telegram.org, or Bot Token for Bot API
apiHashstringYesAPI Hash from my.telegram.org
sessionStringstringNoSerialized session string for user account auth
chatIdstringYesTarget chat ID or username
messagestringYesText message to send

Output

ParameterTypeDescription
messageIdnumberID of the sent message
successbooleanWhether the message was sent

telegram_mtproto_get_history

Retrieve message history from a chat

Input

ParameterTypeRequiredDescription
apiIdstringYesAPI ID or Bot Token
apiHashstringYesAPI Hash
sessionStringstringNoSession string
chatIdstringYesChat ID or username
limitnumberNoNumber of messages to retrieve

Output

ParameterTypeDescription
messagesarrayArray of message objects
countnumberTotal messages returned

telegram_mtproto_get_dialogs

List all accessible dialogs

Input

ParameterTypeRequiredDescription
apiIdstringYesAPI ID or Bot Token
apiHashstringYesAPI Hash
sessionStringstringNoSession string
limitnumberNoMaximum dialogs to return

Output

ParameterTypeDescription
dialogsarrayArray of dialog objects (chats, groups, channels)

On this page

Empieza a construir hoy
Más de 100 000 constructores confían en nosotros.
La plataforma SaaS para crear agentes de IA y operar tu fuerza de trabajo agéntica.
Empezar