我用setwebhook方法設置了webhook my telegram bot,但是當我在bot中發送消息時,請不要在我的URL中使用它。我設置了我的電報bot webhook,但不要發送電報。爲什麼?
https://api.telegram.org/bot<token>/setwebhook?url=https://www.example.com/bot/temp.php
在我的主機我使用PHP語言進行分析和回答。我用這個命令從bot獲取更新。
$update = file_get_contents(「php://input」);
但是在運行這條線之後$ update是空的。 我沒有問題,沒有setwebhook機器人更新時,我使用webhook不採取數據。
結果運行getWebhookinfo是:
{"ok":true,"result":{"url":"https://example.com/bot/temp.php","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}
我必須是真正的 「has_custom_cere」? 感謝您的幫助
SSL/TLS1.2被接受電報有我的託管。 – mohammad
我還沒有任何PHP errore – mohammad
好的和'/ getwebhookinfo'says? – creyD