I have read the documentation here https://core.telegram.org/api.I want to use API (not bot).I created an application and received api_id
, api_hash
, Test configuration (ip
and port
), Production configuration (IP and port) and Public keys.This is all methods https://core.telegram.org/methods. I want use method auth.checkPhone
,but I do not understand how to send a request.
Headers should be such as:
POST /apiw1 HTTP/1.1Host: 000.000.000.000:443 //Production configurationConnection: keep-aliveContent-Length: ...Origin: ...User-Agent: ...Accept: */*Referer: ...Accept-Encoding: gzip, deflateAccept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
But the data is encoded by MTProto.
From documentation written:
auth.checkedPhone#e300cc3b phone_registered:Bool phone_invited:Bool = auth.CheckedPhone;---functions---auth.checkPhone#6fe51dfb phone_number:string = auth.CheckedPhone;
Please tell me step by step how to encode data from this method auth.checkPhone
. And how to get the Authorization Key? I read the documentation, but I do not understand. Tell me the logic please, the code I will write itself on PHP.