How to set Telegram bot webhook?

后端 未结 1 1340
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 03:42

I\'m developing a Telegram bot, and I want to set the webhook to my domain\'s URL. I\'ve already generated a self-signed certificate following the Telegram\'s guide. However

1条回答
  •  孤城傲影
    2020-12-14 04:10

    I created a file on my server for conveniently setting up telegram webhooks.

    You can use the same file on your server.

    This should be on the same server from which you wish to run the Telegram Bot

    
    
    
      Set Webhooks
      
      
      
    
    
    
      


    {{ bot_url }}




    Get Webhook Info

    1. Drop this file on the same server you wish to host you bots
    2. Ensure the mime-type for .pem is enabled on your webserver
    3. Browse to this page on our server
    4. Fill the form with your BOT_TOKEN and chosen PORT
    5. Upload your certificate file
    6. Submit the form

    You will get a successful result:

    {"ok":true,"result":true,"description":"Webhook was set"}
    

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