Answer the question
In order to leave comments, you need to log in
How to upload file to Telegram server in python to get file_id?
You need to send an audio recording in the message that is stored on disk, but to do this, it is required that the file has already been uploaded to the server and there is a file_id of this file. So how do you upload a file to the server?
the api for bots specifies three methods:
Sending by file_id
Sending by URL
and
Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.
Answer the question
In order to leave comments, you need to log in
You type in the address bar https://api.telegram.org/bot<ТОКЕН>/getUpdates
, send the file you need to the bot, refresh the page and voila, you get the file_id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question