wiz0u / WTelegramClient

Telegram Client API (MTProto) library written 100% in C# and .NET
https://wiz0u.github.io/WTelegramClient/
MIT License
942 stars 154 forks source link

No SMS after 18.2.2023 #125

Closed salusalpha closed 1 year ago

salusalpha commented 1 year ago

Telegram informed that -->

Please note that due to recent updates to Telegram's handling of SMS and the integration of new SMS providers like Firebase, we are changing the way login codes are handled in third-party apps based on the Telegram API.

Starting on 18.02.2023, users logging into third-party apps will only be able to receive login codes via Telegram. It will no longer be possible to request an SMS to log into your app – just like when logging into Telegram's own desktop and web clients.

Exactly like with the Telegram Desktop and Web apps, if a user doesn’t have a Telegram account yet, they will need to create one first using an official mobile Telegram app.

How to overcome programmatically?

wiz0u commented 1 year ago

You can still possibly receive the code via:

Last 3 methods must be enabled in the CodeSettings argument passed to LoginUserIfNeeded

Telegram change is likely to prevent spammers from using lots of fake phone numbers and automating the login via SMS received on these. Therefore I won't provide further help to "overcome programmatically" this limitation.

salusalpha commented 1 year ago

Can you please provide a sample that uses LoginUserIfNeeded and passes CodeSettings.Flags.allow_missed_call. Thanks.

wiz0u commented 1 year ago

really? 🙄 I think you're being lazy here.

await client.LoginUserIfNeeded(new CodeSettings { flags = CodeSettings.Flags.allow_missed_call });