Skip to content
Back to top
View this page

# InputPaidMediaLivePhoto

class telegram.InputPaidMediaLivePhoto(media, photo, *, api_kwargs=None)

  Bases: `telegram.InputPaidMedia`

  The paid media to send is a live photo.

  See also

  Working with Files and Media

  Use In

  `telegram.Bot.send_paid_media()`

  Added in version 22.8.

  Parameters:

    - media (`str` | file object | `InputFile` | `bytes` | `pathlib.Path` | `Video`) – Video of the live photo to send. Pass a `file_id` to send a file that exists on the Telegram servers (recommended). To upload a file, you can either pass a file object (e.g. `open("filename", "rb")`) or the file contents as bytes. If the bot is running in `local_mode`, passing the path of the file (as string or `pathlib.Path` object) is supported as well. Sending live photos by a URL is currently unsupported. Lastly you can pass an existing `telegram.Video` object to send.

    - photo (`str` | file object | `InputFile` | `bytes` | `pathlib.Path` | `PhotoSize`) – Photo of the live photo to send. Pass a `file_id` to send a file that exists on the Telegram servers (recommended). To upload a file, you can either pass a file object (e.g. `open("filename", "rb")`) or the file contents as bytes. If the bot is running in `local_mode`, passing the path of the file (as string or `pathlib.Path` object) is supported as well. Sending live photos by a URL is currently unsupported. Lastly you can pass an existing `telegram.PhotoSize` object to send.

  type

    Type of the media, always `'live_photo'`.

    Type:

      `str`

  media

    Video of the live photo to send. Pass a `file_id` as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one. To upload a file, you can either pass a file object (e.g. `open("filename", "rb")`) or the file contents as bytes. If the bot is running in `local_mode`, passing the path of the file (as string or `pathlib.Path` object) is supported as well.

    Type:

      `str` | `telegram.InputFile`

  photo

    Photo of the live photo to send. Pass a `file_id` as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one. To upload a file, you can either pass a file object (e.g. `open("filename", "rb")`) or the file contents as bytes. If the bot is running in `local_mode`, passing the path of the file (as string or `pathlib.Path` object) is supported as well.

    Type:

      `str` | `telegram.InputFile`