3

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 metod auth.checkPhone. But I do not understand how to send a request.

Headers should be such as:

POST /apiw1 HTTP/1.1
Host: 000.000.000.000:443 //Production configuration
Connection: keep-alive
Content-Length: ...
Origin: ...
User-Agent: ...
Accept: */*
Referer: ...
Accept-Encoding: gzip, deflate
Accept-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 metod 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.

Mike
  • 14,010
  • 29
  • 101
  • 161

0 Answers0