A
A
AlmazKayum2021-04-05 21:36:19
Bots
AlmazKayum, 2021-04-05 21:36:19

How to use one file_id in different telegram bots? And why is file_unique_id needed in telegram types?

Hello.
Let's say a telegram chat bot often sends a photo to a user.
As usual it works.
We upload the picture to the telegram servers, get its file_id, save it, and then send it to the user using the send_photo method.
The same file_id cannot be used in another telegram bot, an error will occur.

Question: how can a picture once uploaded be used in different telegram bots? In fact, you need to make mirrors of the bot.

Question 2: Why is file_unique_id needed if you can neither download a picture nor use it with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jerwright, 2021-04-06
@jerwright

According to the documentation :
file_id - The ID of this file, which can be used to download or reuse the file.
file_unique_id - A unique identifier for this file, which must be the same over time and across bots. Cannot be used to download or reuse a file.
Here are answers to both questions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question