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.

 Method schema is available as of layer 161. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
peer InputPeer Peer where the story was posted.
id int ID of story to edit.
media flags.0?InputMedia If specified, replaces the story media.
media_areas flags.3?Vector<MediaArea> Media areas associated to the story, see here » for more info.
caption flags.1?string If specified, replaces the story caption.
entities flags.1?Vector<MessageEntity> Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ».
privacy_rules flags.2?Vector<InputPrivacyRule> If specified, alters the privacy settings » of the story, changing who can or can't view the story.

Result

Updates

Both users and bots can use this method

Possible errors

Code Type Description
400 PEER_ID_INVALID The provided peer id is invalid.
400 STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.

Related pages

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

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

Connected business bots

Business users can connect Telegram bots that will process and answer messages on their behalf. This allows businesses 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.