telegram api method · layer 229 · #8f9e6898

stories.sendStory

usable by users and bots

Uploads a Telegram Story.

definition

stories.sendStory#8f9e6898 flags:# pinned:flags.2?true noforwards:flags.4?true fwd_modified:flags.7?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int fwd_from_id:flags.6?InputPeer fwd_from_story:flags.6?int albums:flags.8?Vector<int> music:flags.9?InputDocument = Updates;

parameters

nametypedescription
flags#Flags, see TL conditional fields
pinnedflags.2?trueWhether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info.
noforwardsflags.4?trueIf set, disables forwards, screenshots, and downloads.
fwd_modifiedflags.7?trueSet this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting.
peerInputPeerThe peer to send the story as.
mediaInputMediaThe story media.
media_areasflags.5?Vector<MediaArea>Media areas associated to the story, see here » for more info.
captionflags.0?stringStory caption.
entitiesflags.1?Vector<MessageEntity>Message entities for styled text, if allowed by the stories_entities client configuration parameter ».
privacy_rulesVector<InputPrivacyRule>Privacy rules for the story, indicating who can or can't view the story.
random_idlongUnique client message ID required to prevent message resending.
periodflags.3?intPeriod after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
fwd_from_idflags.6?InputPeerIf set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.
fwd_from_storyflags.6?intIf set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.
albumsflags.8?Vector<int>If set, adds the story to the specified albums.
musicflags.9?InputDocument

returns

Updates

errors (20)

codeerrordescription
400BOOSTS_REQUIREDThe specified channel must first be boosted by its users in order to perform this action.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400IMAGE_PROCESS_FAILEDFailure while processing image.
400MEDIA_CAPTION_TOO_LONGThe caption is too long.
400MEDIA_EMPTYThe provided media object is invalid.
400MEDIA_FILE_INVALIDThe specified media file is invalid.
400MEDIA_TYPE_INVALIDThe specified media type cannot be used in stories.
400MEDIA_VIDEO_STORY_MISSINGA non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument).
400PEER_ID_INVALIDThe provided peer id is invalid.
400PHOTO_INVALID_DIMENSIONSThe photo dimensions are invalid.
400PREMIUM_ACCOUNT_REQUIREDA premium account is required to execute this action.
400REACTION_INVALIDThe specified reaction is invalid.
400STORIES_TOO_MUCHYou have hit the maximum active stories limit as specified by the `story_expiring_limit_*` client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire.
400STORY_PERIOD_INVALIDThe specified story period is invalid for this account.
400VENUE_ID_INVALIDThe specified venue ID is invalid.
400VIDEO_DURATION_INVALIDThe duration of the specified video is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
403BOT_ACCESS_FORBIDDENThe specified method *can* be used over a business connection for some operations, but the specified query attempted an operation that is not allowed over a business connection.

history

present in layers 160–229 · constructor id changed 5×

idlayers
#424cd47a160
#d455fcec161–163
#bcb73644164–166
#e4e6694b167–210
#737fc2ec211–223
#8f9e6898224–229