One of the first steps to start using the API is this. I have MTProto server (149.154.167.40:443), phone number, api id, hash...
How do I exactly do it? How do I make such a query? I sooo don't get it.
Thanks in advance
There are two classes of MTProto methods: Encrypted and Plain.
Before you can start sending encrypted messages you need a valid session (and server salt) in one of Telegram's DCs (Data Centers).
To create a valid session, you need to go through the process of creating an Auth-Key. Going through this process will get you started on how to communicate with the Telegram Server.
All the examples linked below communicate with Telegram Servers via TCP
msg = TL.invokewithlayer(@layer, TL.initconnection(@app_id, @device_model, @system_version, @app_version, @lang_code, TL.help_getnearestdc))
MTProto format is: auth_id + msg_key + enc_payload
enc_payload = AES_IGE_enc(payload)
payload = salt + session_id + msg_id + seq_no + len(msg) + msg + padding
You can get the above from here