is it possible to define how the verification code will be sent when calling the LoginUserIfNeeded method? I need to send it via SMS and not to the application.
sending the verification code to the SMS and not to the application
1.8k Views Asked by user13864604 At
1
There are 1 best solutions below
Related Questions in TELEGRAM-API
- How to leave private group on telegram with Python
- Get last message/s from Telegram channel with Python
- Can Telegram Bot ask user to take picture from camera?
- Telegraf JS: how can i clear history of a chat?
- Keep WTelegram.Client persistent between user requests?
- Create Telegram Group Topic using api or Pyrogram
- What's the difference between inputUser and inputPeerUser?
- Is there a way to redirect all Telegram messages received by an account to a Telegram group, channel or bot?
- telethon and opentele conflict
- Telegram client API : USER_ID_INVALID for all except me
- Telegram api setWebhook not working: Connection failed because the connected party did not respond properly
- Files larger than 50kb are not sent
- Get telegram group ID
- How can I get/write info about/in comments to telegram channel?
- PEER_ID_INVALID when sending message to new user
Related Questions in WTELEGRAMCLIENT
- Keep WTelegram.Client persistent between user requests?
- Retrieve the forum topics of a channel/group in Telegram using WTelegramClient API
- WTelegramClient giving FILE_PART_X_MISSING error when sending image
- Telegram client API : USER_ID_INVALID for all except me
- PEER_ID_INVALID when sending message to new user
- How to Upload Streamable Video?
- WTelegramClient not reconnecting after Internet connection is lost
- WTelegramClient, when and where to enter verification code after initial config run?
- WTelegramClient on Azure Function session file is being used by another process
- How do I send a message to a topic?
- get the chat a message was forwarded from
- Via Client.Update how to find out that I sent a message?
- C# WTelegramClient Telegram-API How to programmatically click a button in a message from Telegram-Bot
- How can I comment on a post in a telegram channel (WTelegramClient)?
- How do I know that a telegram message has been viewed by the interlocutor
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Telegram servers decide by themselves through which method to send the code initially.
However if the user did not receive the code (eventually after a given timeout), he can request the code to be sent through an alternative method:
In WTelegramClient, this is done by returning an empty string for "verification_code" (typically, only on the first try)
You should probably first check through which medium Telegram sent the code:
The
client.OnOtherevent receives a Auth_SentCode object specifying details (type) about the transmitted verification code. Then you can decide to reply the empty string only if it was transmitted through a medium you don't have access to.You can check via the
Auth_SentCode.next_typefield which method will be used to send the code on the next try. (and you can possibly reply an empty verification_code again to try yet another method)Additionally, on the call to
LoginUserIfNeededyou can pass a CodeSettings instance which offer some limited options about the enabled methods for sending of the code.⚠️⚠️ EDIT: Since February 2023, it's no longer possible to receive verification code by SMS with third-party libraries. Verification code can still be sent via various medias: other App sessions, email, phone call or device notifications