skip to Main Content

Is there any way to pass additional data values from custom keyboard layout buttons?

I need to pass a value like ID that they are hidden from user:

{"Button1",{"id":1}} ... 

2

Answers


  1. That’s not currently possible. It would be a great addition to the API, though, in order to separate the text you see from the value you send back to the bot.

    Login or Signup to reply.
  2. You cannot do it with custom keyboards, but it is possible with callback_data param of InlineKeyboard

    When user will press inline button with callback_data specified message received by bot will be type of CallbackQuery with data param containing your data from the button.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search