stories.editStory #

Edit an uploaded story

May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer: in this context, the method can only be used to edit stories posted by the same business bot on behalf of the user with stories.sendStory.

Layer 223

updatesTooLong#e317af7e = Updates;
updateShortMessage#313bc7f8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShortChatMessage#4d6deea5 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:long chat_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShort#78d4dec1 update:Update date:int = Updates;
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
updateShortSentMessage#9015e101 flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
---functions---
stories.editStory#b583ba46 flags:# peer:InputPeer id:int media:flags.0?InputMedia media_areas:flags.3?Vector<MediaArea> caption:flags.1?string entities:flags.1?Vector<MessageEntity> privacy_rules:flags.2?Vector<InputPrivacyRule> = Updates;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
peerInputPeerPeer where the story was posted.
idintID of story to edit.
mediaflags.0?InputMediaIf specified, replaces the story media.
media_areasflags.3?Vector<MediaArea>Media areas associated to the story, see here » for more info.
captionflags.1?stringIf specified, replaces the story caption.
entitiesflags.1?Vector<MessageEntity>Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ».
privacy_rulesflags.2?Vector<InputPrivacyRule>If specified, alters the privacy settings » of the story, changing who can or can't view the story.
musicflags.4?InputDocumentIf set, the new audio track to play as background music for the story.

Result #

Updates

Both users and bots can use this method #

Possible errors #

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORY_NOT_MODIFIEDThe new story information you passed is equal to the previous story information, thus it wasn't modified.

Telegram Stories #

Telegram users and channels can easily post and view stories through the API.

Styled text with message entities #

How to create styled text with message entities

Client configuration #

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.

Privacy settings #

Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.

Connected business bots #

Users can connect Telegram bots that will process and answer messages on their behalf. This allows them to seamlessly integrate any existing tools and workflows, or add AI assistants that manage their chats.

invokeWithBusinessConnection #

Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.

Make sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the botBusinessConnection that is being used.

stories.sendStory #

Uploads a Telegram Story.

May also be used in a business connection, not by wrapping the query in invokeWithBusinessConnection », but rather by specifying the ID of a controlled business user in peer.