The Telgram Core API works using MtProto , a proprietary protocol. Although it provides both encryption and most of the services that TLS provides, it is still very different from it. (Let me remind you that HTTPS is plain HTTP over TLS, and which in turn is built on top of TCP).
MtProto can work using quite diverse transport (TCP, HTTP, etc.). The protocol consists of two main parts: for cloud chat rooms that are accessible on any authorized device, and for secret chat rooms that are completely encrypted from device to device (end- to-end).
The basic telegram protocol allows you to exchange arbitrary finite length messages with the server. The messages here imply certain pieces of data: setting parameters, querying the list of chats, notifications, etc. In a word, everything that is so-called. high-level API. The complete scheme can be found on the Telegram website https://core.telegram.org/schema .
Fortunately, to interact with MtProto, you don’t have to implement it yourself. You can use the finished application telegram-cli . Its code is closed (at least the part related to the protocol). If there is a desire to study the protocol in more detail, in my opinion, the current code can be found in the Telegram Desktop repository.
See my other answer for an example of a script for telegram-cli .
NB: please do not confuse the above with the Telegram Bot API. This is the usual Rest API and works on top of the usual HTTPS (like on VKontakte, as well as the API of many other popular services).