How to implement user authorization in the bot telegram?

Good day!
Task is to implement a bot which autorizovanem users.

In the forehead the solution is to authenticate by password, but is it possible to remove the password from a chat after the user has entered it? In the chat there should be no password.

Maybe suggest other ways of authorization, SMS is also not suitable, since SMS comes to phone fit but anyone can get in.
July 8th 19 at 15:22
1 answer
July 8th 19 at 15:24
Solution
Password after entering, you can remove.
Possible when you enter to immediately change to an asterisk (editMessageText)
Ie not a problem

The password is numeric or alpha?
If digital, do callbacl keyboard, when you click to leave a callback request on the server will fix the figure in a text block send *
After finishing input, press the button on the keyboard and send code. (There is a flight of fancy)
I use this library for work with API https://github.com/yagop/node-telegram-bot-api
Looked like a function editMessageText implemented.
The password will be random.
Thank you! Something I nedochital API gallop ran ) I Will try. - Will_Dietrich commented on July 8th 19 at 15:27
And about the keypad it is possible more in detail? Her need to create or have a predefined set of keyboards that you can call? How to end input? - Will_Dietrich commented on July 8th 19 at 15:30
Do the keyboard what you want
https://core.telegram.org/bots (keyboards section)
https://core.telegram.org/bots/api#inlinekeyboardmarkup - jaunita_Yun commented on July 8th 19 at 15:33
: promising according to the description editmessagetext ruled their only posts, and not custom? - Will_Dietrich commented on July 8th 19 at 15:36
Yes. but the input is via the buttons on your (created) keyboard. i.e. the user sends a message with the password, and presses the button - jaunita_Yun commented on July 8th 19 at 15:39
: I'm only explore this possibility in theory, will be clear when to implement start, here is a link to the answer in my question on a telegram: How to implement user authorization in the bot telegram? in the comments. There is proposed to implement this functionality via custom keyboard - Will_Dietrich commented on July 8th 19 at 15:42

Find more questions by tags Telegram