Skip to content
Back to top
View this page

# InputStoryContentPhoto

class telegram.InputStoryContentPhoto(photo, *, api_kwargs=None)

  Bases: `telegram.InputStoryContent`

  Describes a photo to post as a story.

  Use In

  - `telegram.Bot.edit_story()`

  - `telegram.Bot.post_story()`

  Added in version 22.1.

  Parameters:

    photo (file object | `bytes` | `pathlib.Path` | `str`, optional) – The photo to post as a story. The photo must be of the size `'1080'` x `'1920'` and must not exceed `'10000000'` MB. 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

    Type of the content, must be `PHOTO`.

    Type:

      `str`

  photo

    The photo to post as a story. The photo must be of the size `'1080'` x `'1920'` and must not exceed `'10000000'` MB.

    Type:

      `telegram.InputFile`