getFile | R Documentation |
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.
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
again.
getFile(file_id, destfile = NULL, ...)
file_id |
The file identifier. |
destfile |
(Optional). If you want to save the file, pass by a
character string with the name where the downloaded file is saved.
See the |
... |
(Optional). Additional parameters to be passed to
|
You can also use it's snake_case equivalent get_file
.
## Not run: bot <- Bot(token = bot_token("RTelegramBot")) chat_id <- user_id("Me") photos <- bot$getUserProfilePhotos(chat_id = chat_id) # Download user profile photo file_id <- photos$photos[[1L]][[1L]]$file_id bot$getFile(file_id, destfile = "photo.jpg") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.