Locally everything works, with the help of "ngrok" I hang up a webhook. I uploaded the code to "pythonanywhere" and the handlers are idle.
There is such a view for Flask
@app.route("/", methods=["GET", "POST"])
def receive_update():
if request.headers.get("content-type") == "application/json":
json_string = request.get_data().decode("utf-8")
update = telebot.types.Update.de_json(json_string)
bot.process_new_updates
return ""
else:
abort(403)
telegram sends updates to the server, but I'm confused by the presence of such entities
<telebot.types.User object at 0x7fc907fb8b0>,
instead of key: valueю
{'update_id': ******, 'message': {'content_type': 'text', 'id': ****, 'message_id': ****, 'from_user': <telebot.types.User object at 0x7f5c07fb8b0>, 'date': *********, 'chat': <telebot.types.Chat object at 0x7f5c907fb82>, 'sender_chat': None, 'forward_from': None, 'forward_from_chat': None, 'forward_from_message_id': None, 'forward_signature': None, 'forward_sender_name': None, 'forward_date': None, 'is_automatic_forward': None, 'reply_to_message': None, 'via_bot': None, 'edit_date': None, 'has_protected_content': None, 'media_group_id': None, 'author_signature': None, 'text': '/start', 'entities': [<telebot.types.MessageEntity object at 0x7f5c07fba00>], 'caption_entities': None, 'audio': None, 'document': None, 'photo': None, 'sticker': None, 'video': None, 'video_note': None, 'voice': None, 'caption': None, 'contact': None, 'location': None, 'venue': None, 'animation': None, 'dice': None, 'new_chat_member': None, 'new_chat