How to send request to telegram for use telegram api

1.2k views Asked by At

I have a app using the telegram API.

And I have an api_id and an api_hash.

Now I want to register a user to his telegram account (using the API).

I read this page. It said for example for auth.sendCode to use this code:

auth.sentCode#efed51d9 phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
auth.sentAppCode#e325edcf phone_registered:Bool phone_code_hash:string send_call_timeout:int is_password:Bool = auth.SentCode;
---functions---
auth.sendCode#768d5f4d phone_number:string sms_type:int api_id:int api_hash:string lang_code:string = auth.SentCode;

Should I send the URL or what? For example in the telegram bot API for get me function we should send requests to this url:

https://api.telegram.org/bot#key/getme

Is the problem this example?

If there is a result on github or here please tell me .

1

There are 1 answers

0
Luca On

The difference between bot api and user api is the type of communication, bot api use Https protocol, user api use Transmission Control Protocol (tcp). You should use a client not a browser, I suggest you to use MadelineProto. I'm sorry for my english