【问题标题】:How to send request to telegram for use telegram api如何向电报发送请求以使用电报 api
【发布时间】:2023-03-13 09:26:02
【问题描述】:

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

我有一个api_id 和一个api_hash

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

我读过this page。 它说例如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

这个例子有问题吗?

如果在 githubhere 上有结果,请告诉我。

【问题讨论】:

    标签: php json api telegram telegram-webhook


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-24
      • 1970-01-01
      • 1970-01-01
      • 2016-04-30
      相关资源
      最近更新 更多