2 ms·
Telegram's bot API is really nice and easy-to-use, to the point where you could easily use it via curl or even a web browser. The same can't be said about the
by miki123211 4y ago
Telegram's bot API is really nice and easy-to-use, to the point where you could easily use it via curl or even a web browser.
The same can't be said about the third-party client protocol, which is a perfect example of NIH syndrome. Where the bot API is bog standard JSON over HTTPS, the client API has its own encryption protocol, its own connection protocol, its own serialization standard and its own schema language. Everything is reasonably well documented, but some of the documentation (particularly for the schema/serialization part) is somewhat hard to understand if you're not a mathematician and/or well-versed in statically-typed functional languages like Haskell and the associated theory. Some parts, voice and video calls in particular aren't documented at all. Where every other part of the API has a precisely defined schema, this one just expects a binary blob of unspecified contents. There's a tgcalls library (written in C++) that implements this protocol, but its Github repository doesn't contain the needed build scripts nor any information on what other libraries it relies on (and it definitely relies on at least WebRTC and probably some others.)