Answer the question
In order to leave comments, you need to log in
How to draw inline telegram buttons with a bot via url with parameters?
My bot is controlled by a trading expert from an economic platform. Web query capabilities are severely limited.
Tell me how to collect the url so that there are buttons under the message.
For example, this code option creates buttons for the keyboard:
json parameters are passed to the url.
_https://api. telegram. org/bot782651123:123123123123MjXXYLUsm_B0_15OMZoQ/sendMessage?chat_id=29949698&text=text_here&disable_notification=true&reply_markup={"keyboard":,"one_time_keyboard":false,"resize_keyboard" :false}
Answer the question
In order to leave comments, you need to log in
$btn1 = ['text' => 'Наш сайт', 'url' => 'https://google.com/'];
$btn2 = ['text' => 'Контакты', 'callback_data' => 'Контакты'];
$btn3 = ['text' => 'О нас', 'callback_data' => 'О нас'];
$inlineKeyboardButtons = ; // Наш сайт будет на первой строке, О нас и Контакты на второй
$inlineKeyboard = ['inline_keyboard' => $inlineKeyboardButtons];
$inlineKeyboard = json_encode($inlineKeyboard);
$url = 'https:// api. telegram. org/bot782651123:123123123123MjXXYLUsm_B0_15OMZoQ/sendMessage?chat_id=29949698&text=text_here&reply_markup='.$inlineKeyboard.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question