Skip to content

postStory

Function · TDLib 1.8.67 · d1085f9c

Posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story

postStory(
  chat_id: int53,
  content: InputStoryContent,
  areas: InputStoryAreas,
  caption: FormattedText,
  privacy_settings: StoryPrivacySettings,
  album_ids: list of int32,
  active_period: int32,
  from_story_full_id: StoryFullId,
  is_posted_to_chat_page: Bool,
  protect_content: Bool
) → Story

chat_id

int53

Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user

content

InputStoryContent

Content of the story

areas

InputStoryAreas

Clickable rectangle areas to be shown on the story media; pass null if none

caption

FormattedText

Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption")

privacy_settings

StoryPrivacySettings

The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats

album_ids

list of int32

Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption("story_album_size_max") stories

active_period

int32

Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise

from_story_full_id

StoryFullId

Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story

is_posted_to_chat_page

Bool

Pass true to keep the story accessible after expiration

protect_content

Bool

Pass true if the content of the story must be protected from forwarding and screenshotting