L
L
Lans2021-09-12 10:01:04
Python
Lans, 2021-09-12 10:01:04

Getting the file_id of a photo with Telethon?

I'm creating a Telegram bot and I need to get a file_id, like photos. file_id example:

"AgACAgIAAx0CW7VwqQAD3GE80mUSC6AbGV2lcHFzI5J3me7zAAJwtTEbkWJISbKzPMDueHfrAQADAgADeAADIAQ"

I figured out how to get the file_id of the document:
event.file.id
But if you get photos this way, it gives an error: Is it possible to get the file_id of the photo? If you need more information, please ask. Thank you!
'PhotoSize' object has no attribute 'location'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question