Reputation: 53006
I want to use InlineKeyboardButton in a telegram bot.
My request is a GET request to the following url1
https://api.telegram.org/bot{TOKEN}/sendMessage?chat_id={ID}&text=Hello&reply_markup={"inline_keyboard":[[{"text":"Click","callback_data":"1"}]]}
I receive the message with one inline button and it works as expected however, after clicking the button there are no updates received.
I've read the documentation many times and I would excpect an update with callback_query
field but none is received.
I created another bot, and it works exactly as expected. So now the question is
1Of course, with the correct bot token and chat id.
Upvotes: 0
Views: 2505
Reputation: 4473
Unfortunately, I cannot reproduce this issue with my bot.
However, the following issues may cause problem described in your question:
sendMessage
and getUpdates
methods are different offset
parameter of getUpdates
method might be invalid, causing needed updates to be confirmed and never
returned to you by telegram serversgetUpdates
preventing you from receiving needed updatesUpvotes: 1