0
votes

Is it possible to save all received photos to folder via telegram bot? There is a method getFile (https://core.telegram.org/bots/api#getfile) but I don't know how to use it.

I'm using a python wrapper around the Telegram Bot API: https://github.com/eternnoir/pyTelegramBotAPI

1

1 Answers

1
votes

If you are talking about saving your photos from chats, then it's not possible with Bot API, but I think it's possible with Telegram Core API and CLI Bots: link.

If you want to save all incoming files to bot, you can use this example from pyTelegramBotAPI dev.

Since photos also have file_id's, you may try to use them in getFile method. Please, remember, that all photos are represented as array of copies of different Width x Height sizes.