2

我有一个使用电报 API 的应用程序。

我有一个api_id和一个api_hash

现在我想将用户注册到他的电报帐户(使用 API)。

我读了这个页面。例如,它说auth.sendCode使用此代码:

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;

我应该发送 URL 还是什么?例如,在get me函数的电报机器人 API 中,我们应该向这个 url 发送请求:

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

这个例子有问题吗?

如果在github这里有结果,请告诉我。

4

1 回答 1

1

bot api 和 user api 的区别在于通信的类型,bot api使用Https 协议user api使用传输控制协议(tcp)。您应该使用客户端而不是浏览器,我建议您使用MadelineProto。我很抱歉我的英语

于 2017-08-27T12:34:37.097 回答