'https://your-domain/path/to/hook.php' */ // Set the webhook $result = $telegram->setWebhook($config['webhook']['url']); // To use a self-signed certificate, use this line instead // $result = $telegram->setWebhook($config['webhook']['url'], ['certificate' => $config['webhook']['certificate']]); echo $result->getDescription(); } catch (Longman\TelegramBot\Exception\TelegramException $e) { echo $e->getMessage(); }