How to send Emoji with Telegram Bot API?

To send an emoji using the Telegram Bot API in PHP, you can use the sendMessage method and include the emoji in the text of the message. For example, to send the "thumbs up" emoji, you would use the following code:

<?php

$chat_id = 12345678;
$emoji = "\xF0\x9F\x91\x8D";
$text = "This is a message with a thumbs up emoji: " . $emoji;
$url = "https://api.telegram.org/bot{$bot_token}/sendMessage";
$data = ["chat_id" => $chat_id, "text" => $text];
$options = [
    'http' => [
        'header' => "Content-type: application/x-www-form-urlencoded\r\n",
        'method' => 'POST',
        'content' => http_build_query($data),
    ],
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);

Watch a course Learn object oriented PHP

You can find the code of the emoji you want to use in unicode, and then use the "\x" + code to add the emoji to the message.