tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
6.91k stars 1.42k forks source link

TDlib PC,Why can't I receive registered SMS #2352

Closed liaoxingquan closed 1 year ago

liaoxingquan commented 1 year ago

I just used the C++version of TDlib PC, but I can't receive the registered SMS

AYMENJD commented 1 year ago

Login codes of type SMS are only sent to official Telegram apps. You can login to that account using one of the official Telegram apps and then you will receive the code from Telegram service notification account.

liaoxingquan commented 1 year ago

But I use the official PC terminal of Telegram, and I also can't receive registered SMS

AYMENJD commented 1 year ago

Try using Telegram Android or IOS.

liaoxingquan commented 1 year ago

why PC terminal can not receive

AYMENJD commented 1 year ago

Due to high costs of sending SMS Telegram has made only official clients to receive SMS.

liaoxingquan commented 1 year ago

Oh, I see

Flohack74 commented 1 year ago

@levlam one more additional question on that, if we request an SMS code via tdlib, is there an error message that this code method is no longer supported?

levlam commented 1 year ago

You can't request an SMS code via TDLib. Instead, TDLib request the app to provide authentication code if appropriate by sending corresponding updateAuthorizationState. There is no way to affect the method, which was used to deliver the code, and the method used by the server can be found in authenticationCodeInfo.type.

Flohack74 commented 1 year ago

Ok so let me explain, our App cannot receive codes anymore since we are not based on Android or iOS IF the user is a first time signup. Is there a way we can evaluate that and tell him, go to another Telegram client, desktop, web, to get you signed up?

levlam commented 1 year ago

There is no way. You need to add something like "if you aren't logged in another app, please, log in using an official mobile Telegram app first" to the description of the authenticationCodeTypeTelegramMessage code type.