Problems with TDLib building its own telegram
I want to develop a dedicated h5 version of the program based on telegram+vue.js. After browsing some information, I found that telegram provides api support for this. I encountered the following problems:
- I found that TDLib can create its own telegram. I read the api's instructions for login/registration. SMS is required for verification. How to log in/register directly by using username and password? Without SMS verification Register; Login.
You can't use Telegram without an owned phone number.
You can't use Telegram without an owned phone number.
If I create my own client, do I also need a mobile phone number to obtain a verification code for registration/login? I found that there are other telegram-based APPs that only use username and password to register and log in. What is the situation?


The following source code is the content after decompilation, you can see the tg related code

These apps aren't related to Telegram.
These apps aren't related to Telegram.
Does it matter? After I traced it, I found that he inherited TLObject and implemented two of his own (protocol or interface?) I want to understand, I don't know where to start, or is it a custom telegral protocol?
login
TL_auth_SignInByPassword


register
TL_auth_SignUpV1


He calls ConnectionsManager#native_init to initialize here and finally passes in a parameter

The
method in the official telegram repository does not have this parameter, which is a bit strange
public static native void native_init(int currentAccount, int version, int layer, int apiId, String deviceModel, String systemVersion, String appVersion, String langCode, String systemLangCode, String configPath, String logPath, String regId, String cFingerprint, String installer, String packageId, int timezoneOffset, long userId, boolean enablePushConnection, boolean hasNetwork, int networkType);
It is estimated that this parameter plays a role. When calling the two custom ones, this parameter is passed in? I don't know what this parameter is used for. I searched around the Internet and couldn't find any instructions.


Does it matter?
Yes, the app isn't related to Telegram. You can't have Telegram account without a phone number.