Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling again.
643 matches
60 actions
Telegram
60 actions
- post_addStickerToSetPOSTv1.0.0
- post_answerInlineQueryPOSTv1.0.0
- post_answerPreCheckoutQueryPOSTv1.0.0
- post_closePOSTv1.0.0
- post_copyMessagePOSTv1.0.0
- post_createNewStickerSetPOSTv1.0.0
- post_editMessageCaptionPOSTv1.0.0
- post_editMessageLiveLocationPOSTv1.0.0
- post_editMessageMediaPOSTv1.0.0
- post_editMessageReplyMarkupPOSTv1.0.0
- post_editMessageTextPOSTv1.0.0
- post_forwardMessagePOSTv1.0.0
- post_getChatPOSTv1.0.0
- post_getChatAdministratorsPOSTv1.0.0
- post_getChatMemberPOSTv1.0.0
- post_getChatMembersCountPOSTv1.0.0
- post_getFilePOSTv1.0.0
- post_getGameHighScoresPOSTv1.0.0
- post_getMePOSTv1.0.0
- post_getMyCommandsPOSTv1.0.0
- post_getStickerSetPOSTv1.0.0
- post_getUpdatesPOSTv1.0.0
- post_getUserProfilePhotosPOSTv1.0.0
- post_kickChatMemberPOSTv1.0.0
- post_leaveChatPOSTv1.0.0
- post_logOutPOSTv1.0.0
- post_pinChatMessagePOSTv1.0.0
- post_promoteChatMemberPOSTv1.0.0
- post_restrictChatMemberPOSTv1.0.0
- post_sendAnimationPOSTv1.0.0
- post_sendAudioPOSTv1.0.0
- post_sendChatActionPOSTv1.0.0
- post_sendContactPOSTv1.0.0
- post_sendDicePOSTv1.0.0
- post_sendDocumentPOSTv1.0.0
- post_sendGamePOSTv1.0.0
- post_sendInvoicePOSTv1.0.0
- post_sendLocationPOSTv1.0.0
- post_sendMediaGroupPOSTv1.0.0
- post_sendMessagePOSTv1.0.0
- post_sendPhotoPOSTv1.0.0
- post_sendPollPOSTv1.0.0
- post_sendStickerPOSTv1.0.0
- post_sendVenuePOSTv1.0.0
- post_sendVideoPOSTv1.0.0
- post_sendVideoNotePOSTv1.0.0
- post_sendVoicePOSTv1.0.0
- post_setChatAdministratorCustomTitlePOSTv1.0.0
- post_setChatDescriptionPOSTv1.0.0
- post_setChatPermissionsPOSTv1.0.0
- post_setChatPhotoPOSTv1.0.0
- post_setChatStickerSetPOSTv1.0.0
- post_setChatTitlePOSTv1.0.0
- post_setGameScorePOSTv1.0.0
- post_setMyCommandsPOSTv1.0.0
- post_setPassportDataErrorsPOSTv1.0.0
- post_setStickerPositionInSetPOSTv1.0.0
- post_setStickerSetThumbPOSTv1.0.0
- post_stopMessageLiveLocationPOSTv1.0.0
- post_stopPollPOSTv1.0.0
Communication/Telegram
post_getFile
v1.0.0Input
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
{
"type": "object",
"required": [
"file_id"
],
"properties": {
"file_id": {
"type": "string",
"description": "File identifier to get info about"
}
}
}Output
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
{
"type": "object",
"required": [
"ok",
"result"
],
"properties": {
"ok": {
"type": "boolean"
},
"result": {
"type": "object",
"description": "This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api/#getfile).\n\nMaximum file size to download is 20 MB",
"required": [
"file_id",
"file_unique_id"
],
"properties": {
"file_id": {
"type": "string",
"description": "Identifier for this file, which can be used to download or reuse the file"
},
"file_path": {
"type": "string",
"description": "*Optional*. File path. Use `https://api.telegram.org/file/bot<token>/<file_path>` to get the file."
},
"file_size": {
"type": "integer",
"description": "*Optional*. File size, if known"
},
"file_unique_id": {
"type": "string",
"description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file."
}
}
}
}
}