Answer the question
In order to leave comments, you need to log in
How to send a file to telegram bot?
How can I send a file to a telegram bot. In Python this is done:
with open(filename, "rb") as rb:
archive = {"document": rb}
requests.post(f"https://api.telegram.org/bot(token)/sendDocument?chat_id=(id)", files=archive)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question