Upload self-signed ssl certificate to telegram

后端 未结 1 1813
予麋鹿
予麋鹿 2021-02-06 18:50

I\'m making telegram bot using webhook on php. The problem is that the webhook doesn\'t set correctly and idk whats the matter. my setwebhook code :

$ch = curl_         


        
相关标签:
1条回答
  • 2021-02-06 19:14

    You can set the webhook via the terminal rather than in your code like so:

    curl -F "url=https://your_domain.com/where-the-script-will-be/bot-script.php" -F "certificate=@/location/of/cert/certificate.crt" https://api.telegram.org/bot000000000:AAAAa0aAA_aaA-Aaaa0A0Aa_a0aa0A0AAAA/setWebhook
    

    This has worked for my own projects without any issues

    0 讨论(0)
提交回复
热议问题