Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How create forms in Telegram bots

For example authorization form has login and password, I want create equivalent form in Telegram.

Q: /signin

A: Enter your login

Q: Somelogin

A: Enter you password

Q: Somepassword

A: Authorization success!

But how I can save incoming data from user? Is any API for it or maybe I must save input data in temporarily database field? (as chat_id, command, session_expire, command_state, command_tmp_data)

like image 919
user3449979 Avatar asked Dec 13 '25 07:12

user3449979


1 Answers

You should use OAuth or redirect users to auth form on your website (and redirect them back after authorization). Send user's auth data in text messages and ask them for it is big evil.

like image 191
anatol Avatar answered Dec 16 '25 14:12

anatol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!