0
Hello
I’m creating an inline bot for Telegram, but I always come across the error QUERY_ID_INVALID. I don’t know where I’m going wrong...
$json = file_get_contents("php://input");
$dados = json_decode($json,true);
$id_query = $dados['inline_query']['id'];
$resultados_inline[] = [
'type' => 'article',
'id' => "1",
'title' => "Test",
'message_text' => "test",
];
$post[] = [
'inline_query_id' => $id_query,
'results' => serialize($resultados_inline),
];
$context_options = array(
'http' => array(
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($post) . "\r\n",
'content' => $post
)
);
file_get_contents("https://api.telegram.org/bot" . $api_telegram . "/answerInlineQuery",NULL,$context);
The code runs well, but Telegram always returns that error. Could you help me?
Grateful