I'm create a telegram bot with https://github.com/php-telegram-bot/core/. Bot is located in Russia. In some reason, Russian authority block some Telegram features and my bot can't send messages to registered users. To avoid it, I'm trying to use proxy as
$telegram = new Longman\TelegramBot\Telegram('API-key', 'Bot-name');
$data = [
'chat_id' => 12345678,
'text' => 'Test message',
];
Longman\TelegramBot\Request::setClient(new \GuzzleHttp\Client([
'base_uri' => 'https://api.telegram.org',
'proxy' => 'socks5://218.248.73.193:1080',
'verify' => false,
]));
$result = Longman\TelegramBot\Request::sendMessage($data);
but it return Telegram returned an invalid response! Please review your bot name and API key.
How to avoid this problem? Thanks in advance!