This is not a Telegram Bot API bot. Do not use it for spam messages, bulk cold messaging, or bypassing Telegram restrictions. Before sending, editing, or deleting content to third parties, your Agent should obtain explicit confirmation.
Deployment and Login
- Create a Telegram Account Proxy in Console → Applications, activate the subscription, and click deploy. Instance resources are automatically configured by the platform.
- After the instance is ready, click “Generate Login QR Code”. The QR code is valid for a short period and can be regenerated after it expires.
- In Telegram, open Settings → Devices → Link Desktop Device and scan the QR code.
- If the status becomes
password_required, enter the Telegram two-step verification password in the console. The password is submitted only to your tenant instance and will not be written to platform configuration. - After the status becomes
authenticated, the console displays the current account, MCP address, and Bearer access token.
/api/auth/logout to revoke the Telegram session; “Destroy Instance” also deletes the workload and persistent volume.
Authentication and Health Checks
Except for/health and /readyz, login, REST, and MCP interfaces all require:
/health only indicates that the HTTP process is alive:
/readyz indicates whether the MTProto connection is available. When connected, it returns HTTP 200, even if the account is still scanning the code or waiting for two-step verification:
login_state values include login_required, waiting_scan, password_required, and authenticated; authenticated must still be reached before performing account message operations.
Connecting MCP Clients
Claude Code
Clients Such as Cursor That Support Static Request Headers
Configure the Streamable HTTP address according to the client’s current documentation, and add theAuthorization request header. For example, clients supporting the following structure can use:
claude_desktop_config.json; if static Bearer request headers are currently required, please use Claude Code or a client that explicitly supports this capability.
MCP Tools
target can be a chat ID, username, or exact chat name; when names are ambiguous, prefer using an ID or username.
REST API
All successful responses use{"data": ...}, and failed responses use {"error": "..."}.
Examples
Complete Interfaces
Frequently Asked Questions
- 401: Bearer token missing or incorrect. Confirm the token is placed in the request header, not in the URL query parameters.
- 503: The proxy access token is not configured, or the Telegram client is not ready yet. Check
/readyzfirst; if the proxy access token is not configured, protected endpoints will also return 503. - 400: Invalid parameters or JSON; search must provide
q, andlimitmust be an integer greater than or equal to 1. - 403 / 404: The current account does not have permission, or the target / message ID does not exist.
- 429: Telegram rate limiting has been triggered. Read
retry_afterand wait; do not retry concurrently. - QR code never completes: Generate the QR code again, and confirm that you are using Telegram’s “Link Desktop Device” QR code scanning entry point.
- Login required again after restart: Check whether the instance persistent volume is functioning properly; you need to scan again after actively logging out, revoking the session in the Telegram device list, or when the session expires.
Verification Scope
The source code and automated tests cover login status, Bearer fail-close, REST parameter validation, error mapping, and session persistence implementation. In production use, you should still first complete read-only and message creation/editing/deletion smoke tests withtarget=me (Saved Messages) before allowing the Agent to operate third-party sessions.
