Layer 227
StoriesStartLive
Start a live story, optionally using RTMP livestream mode, see here for the full flow.
method
Users
stories.startLive#d069ccde flags:# pinned:flags.2?true noforwards:flags.4?true rtmp_stream:flags.5?true peer:InputPeer caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long messages_enabled:flags.6?Bool send_paid_messages_stars:flags.7?long = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Pinned | flags .2? true | Whether to pin the live story on the peer's profile |
| Noforwards | flags .4? true | Whether viewers must be prevented from forwarding or saving the live story |
| RtmpStream | flags .5? true | Create the live story in RTMP livestream mode, where one external streamer publishes all audio and video |
| Peer | InputPeer | User, supergroup or channel that will own the live story; basic groups cannot post live stories |
| Caption | flags .0? string | Live story caption |
| Entities | flags .1? Vector < MessageEntity > | Message entities for styled text |
| PrivacyRules | Vector < InputPrivacyRule > | Privacy rules defining who can view the live story |
| RandomId | long | Client-generated random ID used to prevent duplicate live stories |
| MessagesEnabled | flags .6? Bool | Whether the in-call message overlay should be enabled |
| SendPaidMessagesStars | flags .7? long | Minimum Telegram Stars donation required from users other than the live story owner for each comment; the owner may always comment without donating, and 0 allows free comments for everyone |
Returns
UpdatesGogram Example
// StoriesStartLive - using Params struct result, err := client.StoriesStartLive(&tg.StoriesStartLiveParams{ Pinned: nil, Noforwards: nil, RtmpStream: nil, Peer: &tg.InputPeerUser{UserID: int64(777000)}, Caption: "Hello, World!", Entities: nil, PrivacyRules: &tg.VectorInputPrivacyRule{}, RandomId: int64(1234567890), // ... }) if err != nil { // handle error } // result is *tg.Updates
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_MONOFORUM_UNSUPPORTED | Monoforums do not support this feature. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORY_LIVE_ALREADY_%d | This peer already has an active live story, and its ID is equal to <number>. |