Telegram.Bot: [Error : 400 : Bad Request: QUERY_ID_INVALID]
var link1 = new InlineQueryResultArticle()
{
Id = "1",//Guid.NewGuid().ToString("N"),
Description = "Description",
DisableWebPagePreview = false,
HideUrl = true,
ParseMode = ParseMode.Html,
MessageText = "Text",
Url = "https://kompstar.com/catalog/329649/471772/200000045/i4117225.html",
Title = "res1"
};
I am getting this error on both ways of asign value to ID property. It’s so strange that this exception throwed after the different sequence of operations from time to time. Is it known problem or I’m doing something wrong?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 18 (9 by maintainers)
I tested it and I got an error exactly after 10 seconds delay. So you have to reply within 10 seconds
hi you must answer InlineQuery and CallbackQuery until 15 seconds. after that recive QUERY_ID_INVALID
I’m getting this same error even though I’m answering the query in less than 2 seconds. The data I’m trying to POST back is
The ID I’m using is the ID of the incoming query. I’ve no idea what else to try at this point. Google only points me to more solutions regarding the timeout of the reply.
Robin, I got the next answer from Bot Support:
May be need catch this exception and simply do nothing in catch body? Like here
catch (TaskCanceledException) { }for example.Hi I am getting the correct response after doing some POC. I am using java com.github.pengrad. below the code.
below the console output:
And I am getting proper response in my mobile telegram app also.
InlineQueryResultArticlerequires the propertyInputMessageContent, that’s theCan't find field "message_text"error.I receive
[Error : 400 : Bad Request: QUERY_ID_INVALID]if I delay the response by 8-10 seconds. But can’t find anything in the docs about some timeout.