Java 如何在 Telegram API 中获取我的应用程序 ID?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21878812/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How Can I get my app id in Telegram API?
提问by adpoy
I am trying to get my app id from Telegram API by using the method register.saveDeveloperInfo
, but I cannot find the way to do it.
我正在尝试使用方法从 Telegram API 获取我的应用程序 ID register.saveDeveloperInfo
,但我找不到这样做的方法。
I'm using de MTProto Java library.
我正在使用 de MTProto Java 库。
This is what I had done by now:
这就是我现在所做的:
- I made my own
register.saveDeveloperInfo
implemmentation in Java. - I call the method with the corrects params (https://core.telegram.org/api/obtaining_api_id)
- The method returns a true boolean but I have not received the sms with my app_id.
- When I enter in my app section of the telegram web (https://core.telegram.org/myapp) shows the "Your app is not ready yet" message.
- 我用
register.saveDeveloperInfo
Java实现了自己的实现。 - 我使用更正参数调用该方法(https://core.telegram.org/api/obtaining_api_id)
- 该方法返回一个真正的布尔值,但我没有收到带有我的 app_id 的短信。
- 当我进入电报网站 ( https://core.telegram.org/myapp) 的应用程序部分时,显示“您的应用程序尚未准备好”消息。
Anyway, I'm trying to use the app_id from the source code of the official client but I can't send or receive message.
无论如何,我正在尝试使用官方客户端源代码中的app_id,但我无法发送或接收消息。
Does anyone know how to do it or where can I find more information?
有谁知道怎么做或者我在哪里可以找到更多信息?
回答by brain56
You can get your app api_id and app api_hash from your Telegram app page. This is what you'll be using as of this writing. If you are asked a password, provide the mobile phone number you'll be using to develop and Telegram will send you the password.
您可以从Telegram 应用页面获取应用 api_id 和应用 api_hash 。这是您在撰写本文时将使用的内容。如果系统要求您输入密码,请提供您将用于开发的手机号码,Telegram 会将密码发送给您。
回答by Alexander Suslov
If you are asked a password and Telegram didn't send it to you, try to provide the mobile phone number without "+".
如果您被要求输入密码而 Telegram 没有将其发送给您,请尝试提供不带“+”的手机号码。