我正在查看 telegram API 函数列表:
https://core.telegram.org/method/auth.checkPhone
并且想知道此代码的语言名称是什么:
(auth.checkPhone "1548789888")"=
(auth.checkedPhone
phone_registered:(boolFalse)
phone_invited:(boolFalse)
)
这是json类型吗?
如何用c#编写它?
在哪里可以找到示例应用程序?
最佳答案
Telegram 有自己的内部编码语言,称为 TL。它用于描述 Telegram 服务器理解的所有类型和命令。
您实际上可以构建自己的 Telegram 库,以下是几个步骤:
1) 构建一个可以对 TL 进行编码和解码的 TL 解析器,这并不像听起来那么难:TL 建立在一些原始类型上,您可以查看此处的文档:https://core.telegram.org/mtproto/serialize在这里:https://core.telegram.org/mtproto/TL ,但是从这里的 TL 规范开始要容易得多:https://github.com/zhukov/webogram/blob/master/app/js/lib/schema.tl.txt ,这里:https://github.com/zhukov/webogram/blob/master/app/js/lib/config.js#L97在这里:https://github.com/zhukov/webogram/blob/master/app/js/lib/config.js#L102
2) 一旦构建了 TL 解析器,您需要学习如何创建 Auth_key。 Here is a simple guide for that
3) 您需要在 telegram.org 上注册您自己的 app_id,您需要它来识别您正在构建的 telegram 客户端。
4) 一旦您成功获取您的Auth_key,您就可以follow these additional steps找到离您最近的 Telegram 数据中心,可能会在该数据中心上重新生成您的 Auth_key,然后运行用户。身份验证命令以通过新的 Telegram 客户端在该数据中心上为您的手机号码创建 session
5)一旦您掌握了这些初始步骤,其余的命令应该会更容易。
干杯。
关于c# - 如何通过 Json 在 C# 上使用 telegram API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35327067/