Skip to content

postStory

Returns Story

Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right.

Required: business_connection_id, content, active_period · Optional: 6 parameters

Limits:

  • caption: 0-2048 characters
Try it
Token saved
Response

TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("post_story", {
business_connection_id: "...",
content: { /* InputStoryContent */ },
active_period: 0
})

Parameters

business_connection_id string Required
Unique identifier of the business connection.

content InputStoryContent Required
Content of the story.

active_period number Required
Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400.

caption string
Caption of the story, 0-2048 characters after entities parsing.

parse_mode "HTML" | "MarkdownV2"
Mode for parsing entities in the story caption. See formatting options for more details.

caption_entities MessageEntity[]
A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode.

areas StoryArea[]
A JSON-serialized list of clickable areas to be shown on the story.

post_to_chat_page boolean
Pass True to keep the story accessible after it expires.

protect_content boolean
Pass True if the content of the story must be protected from forwarding and screenshotting.