Answer the question
In order to leave comments, you need to log in
How to get a link to take a picture of a telegram bot sent by a user?
How to get a link to a photo sent by a user to a bot in a telegram?
I could only find how to download the photo, but I need a link.
I use aigram.
Answer the question
In order to leave comments, you need to log in
There is a very crutch method, but if you really need it:
file = await bot.get_file(message.photo[-1].file_id) # message - тип того что вам пришло.
url = f'https://api.telegram.org/file/bot{BOT_TOKEN}/{file.file_path}'
Well, in theory, get the file_id, then getfile and from it the URL
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question