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)
2
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.
Answering your question: You have to save the session (conversation) state like you proposed; the API doesn’t provide you with means to “ask” a user a question.
BUT
user3449979 is right, and you shouldn’t ask for user auth data using plain text; you should use deep linkin together with OAuth or another server-side based authentication method