Recent posts
Tag: #webhook · 2 posts
Posted Aug 25
https://github.com/python-telegram-bot/python-telegram-bot/wiki/Webhooks#heroku On #Heroku using #webhook can be beneficial on the free-plan because it will automatically manage the downtime required. The reverse proxy is set up for you and an environment is created. From this environment you will have to extract the port the #bot is supposed to listen on. Heroku manages the #SSL on the #proxy side, so you don't have provide the certificate yourself.
Posted Aug 25
https://gist.github.com/leandrotoledo/4e9362acdc5db33ae16c # This file is an annotated example of a #webhook based #bot for #telegram. It does not do anything useful, other than provide a quick # template for whipping up a testbot. Basically, fill in the CONFIG # section and run it. # Dependencies (use pip to install them): # - python-telegram-bot: https://github.com/leandrotoledo/python-telegram-bot # - Flask : http://flask.pocoo.org/ # Self-signed SSL certificate (make sure 'Common Name' matches your FQDN): # $ openssl req -new -x509 -nodes -newkey rsa:1024 -keyout server.key -out server.crt -days 3650 # You can test SSL handshake running this script and trying to connect using wget: # $ wget -O /dev/null https://$HOST:$PORT/