File

data class File(file_id: String, file_unique_id: String, file_size: Long?, file_path: String?) : TelegramModel

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.

Maximum file size to download is 20 MB

Constructors

File
Link copied to clipboard
fun File(file_id: String, file_unique_id: String, file_size: Long? = null, file_path: String? = null)
Creates a File.

Properties

file_id
Link copied to clipboard
val file_id: String
Identifier for this file, which can be used to download or reuse the file
file_path
Link copied to clipboard
val file_path: String? = null
Optional.
file_size
Link copied to clipboard
val file_size: Long? = null
Optional.
file_unique_id
Link copied to clipboard
val file_unique_id: String
Unique identifier for this file, which is supposed to be the same over time and for different bots.