Search code examples
phpapiphp-telegram-bot

is it possible to send both ReplyKeybaordMarkup and InlineKeyboardmarkup with one message in telegram bot api


currently i have this but it just sent the 'ReplyKeyboardMarkup'

['chat_id' => 'BlaBlaBla',
 'text' => 'a',
 'reply_markup' => [
     'keyboard' => [[['text' => 'this is reply', 'request_contact' => true ]]] ,
     'inline_keyboard' => [[['text' => 'this is inline' , 'url' => 'BlaBlaBla' ]]]
     ]
]

and this the api if it helps

https://api.telegram.org/botBOT_TOKEN/sendmessage?&reply_markup={"keyboard":[[{"text":"this is reply","request_contact":true}]],"inline_keyboard":[[{"text":"this is inline","url":"BlaBlaBla"}]]}&text=a&type=message&chat_id=BlaBlaBla

Solution

  • Well the answer is no. telegram API document doesn't directly says you can't do this but according to my many research and testing there is no way you can send both of 'reply keyboard' & 'inline button' in one message till now (2021/07/07) .