I have a telegram bot that is set up and connected to my backend. When users choose the "enter password" option I send an inline keyboard next to the request so that the user can enter his numeric password. I do this so that the password will not be shown in the chat. The problem I have is that I make use of the callback_data to assign a value to the pressed button, but these callbacks come through one by one as the button is pressed. I would like to know is it possible to build up an accumulative string of pressed characters, and once the "Submit" button is pressed send through the user's response.
My Inline Request Currently looks as follow:
{
"chat_id": 99999999,
"text": "Enter Password",
"reply_markup": {
"inline_keyboard": [
[{"text": "1","callback_data":"1","pay":true},{"text": "2","callback_data":"2"},{"text": "3","callback_data":"3"}],
[{"text": "4","callback_data":"4"},{"text": "5","callback_data":"5"},{"text": "6","callback_data":"6"}],
[{"text": "7","callback_data":"7"},{"text": "8","callback_data":"8"},{"text": "9","callback_data":"9"}],
[{"text": "0","callback_data":"0"}],
[{"text": "Submit","callback_data":"Submit"}]
]
}
}
Further more is it possible to make the inline buttons go away after the submit has been pressed, I have gone through the telegram bot documentation, and can find any option like this. https://core.telegram.org/bots/api#sendmessage
Kindly advise if this is possible or if I should take another approach.
