get_stories()

Client.get_stories()

Get one or more story from an user by using story identifiers.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target user/channel. For your personal story you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str). You can also use user profile/channel public link in form of t.me/<username> (str).

  • story_ids (int | Iterable of int) – Pass a single story identifier or an iterable of story ids (as integers) to get the content of the story themselves.

Returns:

Story | List of Story – In case story_ids was not a list, a single story is returned, otherwise a list of stories is returned.

Example

# Get one story
await app.get_stories(chat_id, 12345)

# Get more than one story (list of stories)
await app.get_stories(chat_id, [12345, 12346])
Raises:

ValueError – In case of invalid arguments.