12

I have been working a lot on a telegram bot for a long time now, but when I press an inline key to receive the pop up with:

bot.answerCallbackQuery (aalex_id, text = 'Notification at top of screen)

I get this error:

TelegramError: (u'Bad Request: query is too old and response timeout expired or query ID is invalid ', 400

the query id is just correct, and it's not that old lol... I do not know what to do :c

Vaykor MIP
  • 129
  • 1
  • 8

2 Answers2

2

You must use cache_time in answercallbackquery: See this link

k1developer
  • 121
  • 7
  • 1
    A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted](//stackoverflow.com/help/deleted-answers). – snakecharmerb Nov 28 '21 at 07:39
0

i got this error when i used

["callback_query"]["message"]["message_id"] 

instead of

['callback_query']['id']
Lexa Dv
  • 1
  • 1
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 27 '22 at 20:33