I use the python-telegram-bot shell, and I tried to place a simple echo-telegram bot on Heroku by adapting a pre-existing example designed for the Google App Engine, as well as a wiki web guide , but to no avail.
It seems I can not get the webhook to work, and the echo message is correct for the bot.
I canβt understand what happened, so any help to point me in the right direction would be greatly appreciated!
My attempt is described in detail below.
import telegram from os import environ from telegram.ext import Updater from flask import Flask, request from credentials import TOKEN, APP_URL app = Flask(__name__) global bot bot = telegram.Bot(token=TOKEN) @app.route('/' + TOKEN, methods=['POST']) def webhook_handler(): if request.method == "POST":
source share