How to Get Message_id from sent message By BOT Telegram?

Viewed 7550

I program the bot telegram.

I want Get message_id By Bot ,when I sent a message to Group.

My Code is PHP.

$token = "MY_BOT's_TOKEN";

$data = [
    'text' => 'my message here',
    'chat_id' => 'the_chat_id_here'
];

file_get_contents("https://api.telegram.org/bot$token/sendMessage?" . http_build_query($data) );

How Do it?

best regard.

1 Answers
Related