Elixir bindings over Telegram's TDLib, allowing to act as a full-fledged Telegram client.
43cbf301 — Timothée Floure 1 year, 1 month ago
CI: force hex installation
6c21d53b — Timothée Floure 1 year, 1 month ago
Fix indentation of CI configuration file
e0df1778 — Timothée Floure 1 year, 1 month ago
Add CI configuration file (builds.sr.ht)


browse  log 



You can also use your local clone with git send-email.

Elixir TDLib

This elixir library binds telegram's TDLib, allowing you to interact with Telegram as a full-fledged client (not as a bot!). It ships :

Most of the interactions with this project are done via the TDLib module. Any structure used to interact with TDLib is defined under either TDLib.Object or TDLib.Method. You can create as many session as you want, but note that each of them launch a new instance of tdlib-json-cli via a port.


Add the following to your mix.exs :

def deps do
  [{:tdlib, "~> 0.0.2"}]

Note that compiling this project will compile Telegram's TDLib (C++) itself, it's going to take a while and depends on the following :

  • C++14 compatible compiler (clang 3.4+, GCC 4.9+, MSVC 19.0+ (Visual Studio 2015+), Intel C++ Compiler 17+)
  • OpenSSL
  • zlib
  • gperf
  • CMake (3.0.2+)


This library does not need configuration, however, the following options are available :

# Disable automatic handling of authentification and directly forward the
# incoming messages to the client
config :telegram_tdlib, disable_handling: false

# Override default path of the telegram-json-cli binary
config :telegram_tdlib, backend_binary: "/path/to/my/binary"

Usage / Example

A simple example can be found at git.sr.ht/~fnux/elixir-tdlib-demo. Please refer to the TDLib module for proper documentation.