It says in Telegram Core Documentation here:
Markup for replying to the message; for bots only.
So it seems that inline keyboards with callbacks (reply_markup) are only for bots.like this:
$keyboard = [
['7', '8', '9'],
['4', '5', '6'],
['1', '2', '3'],
['0']
];
$reply_markup = $telegram->replyKeyboardMarkup([
'keyboard' => $keyboard,
'resize_keyboard' => true,
'one_time_keyboard' => true
]);
$response = $telegram->sendMessage([
'chat_id' => 'CHAT_ID',
'text' => 'Hello World',
'reply_markup' => $reply_markup
]);
But what I need is a keyboard with callback sent from a non-bot account to a two-side chat, not a channel or group. Is there a workaround?
reply_markup
messages.Unfortunately this isn't that well documented, however on the buttons api it says:
Bots can attach a ReplyMarkup constructor to outgoing messages, to attach an inline keyboard or a custom reply keyboard.
For now, there's no way to send 'buttons' as a regular telegram user.