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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 11:13:36  来源:igfitidea点击:

How Can I get my app id in Telegram API?

javaapitelegram

提问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:

这就是我现在所做的:

  1. I made my own register.saveDeveloperInfoimplemmentation in Java.
  2. I call the method with the corrects params (https://core.telegram.org/api/obtaining_api_id)
  3. The method returns a true boolean but I have not received the sms with my app_id.
  4. 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.
  1. 我用register.saveDeveloperInfoJava实现了自己的实现。
  2. 我使用更正参数调用该方法(https://core.telegram.org/api/obtaining_api_id
  3. 该方法返回一个真正的布尔值,但我没有收到带有我的 app_id 的短信。
  4. 当我进入电报网站 ( 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 没有将其发送给您,请尝试提供不带“+”的手机号码。