Foxel
Menu
On this page

Telegram

Expose message attachments in a channel or group as files. Supports downloading, sending files, and deleting messages when authorized, without traditional directory operations.

Adapter type: telegram. See Common configuration for mounting instructions.

Setup

  1. Sign in to my.telegram.org and create an app under API development tools to obtain api_id and api_hash.
  2. Open the Telegram session tool, use your app credentials, phone number, login code, and two-step password if required to generate session_string.
  3. Join the target channel or group with that account. Set chat_id to its public username or numeric chat ID, such as -1001234567890.
  4. If the Foxel server cannot reach Telegram directly, configure a proxy reachable from that server, supplying protocol, host, and port together.

Configuration

FieldTypeRequiredDefaultDescription
api_idstringYes—Telegram application API ID as a numeric string.
api_hashpasswordYes—API Hash for the same Telegram application.
session_stringpasswordYes—Complete authenticated user session string, not a bot token.
chat_idstringYes—Numeric channel/group ID or public username.
proxy_protocolstringNo—Proxy protocol: socks5 or http.
proxy_hoststringNo—Proxy host reachable from the Foxel server.
proxy_portnumberNo—Proxy port; supply together with protocol and host.

Example

This is a config object. In the admin form, fill the corresponding fields rather than pasting the whole object. Replace credential placeholders with your own values.

json
{
  "api_id": "123456",
  "api_hash": "YOUR_API_HASH",
  "session_string": "YOUR_SESSION_STRING",
  "chat_id": "-1001234567890"
}

Behavior and limitations

  • Names resemble 123_document.pdf, where the prefix is the message ID. Plain-text messages are not regular attachments.
  • Uploading sends a new message and may change the returned filename. Deleting a file deletes its message and requires permission.
  • Directory creation, moves, renames, and copies are unsupported. Common sub_path does not divide a channel into folders.
  • A session is an account login credential; regenerate it after revoking that Telegram session.

Troubleshooting

  • Invalid session: regenerate the complete string; the adapter accepts Telethon StringSession and the compatible session produced by the tool.
  • Chat missing: verify that the session account has joined; a private group display name is insufficient.
  • FloodWait / 429: wait as instructed and reduce concurrency and refresh frequency.
  • Proxy fails: 127.0.0.1 inside a container refers to that container, not the host proxy.

References

External documentation provides service and authorization context. Use this page and the current Foxel adapter for configuration fields and limitations.