sponsoredMessage
sponsoredMessage
Section titled “sponsoredMessage”No description provided by the pinned schema.
Signature
Section titled “Signature”sponsoredMessage#7dbf8673 flags:# recommended:flags.5?true can_report:flags.12?true random_id:bytes url:string title:string message:string entities:flags.1?Vector<MessageEntity> photo:flags.6?Photo media:flags.14?MessageMedia color:flags.13?PeerColor button_text:string sponsor_info:flags.7?string additional_info:flags.8?string min_display_duration:flags.15?int max_display_duration:flags.15?int = SponsoredMessage;Result type
Section titled “Result type”SponsoredMessage
Parameters
Section titled “Parameters”| Name | Type | Flag | Default | Description |
|---|---|---|---|---|
| flags | # | flag word | — | No description provided by the pinned schema. |
| recommended | flags.5?true | flags.5 | — | No description provided by the pinned schema. |
| can_report | flags.12?true | flags.12 | — | No description provided by the pinned schema. |
| random_id | bytes | — | — | No description provided by the pinned schema. |
| url | string | — | — | No description provided by the pinned schema. |
| title | string | — | — | No description provided by the pinned schema. |
| message | string | — | — | No description provided by the pinned schema. |
| entities | flags.1?Vector | flags.1 | — | No description provided by the pinned schema. |
| photo | flags.6?Photo | flags.6 | — | No description provided by the pinned schema. |
| media | flags.14?MessageMedia | flags.14 | — | No description provided by the pinned schema. |
| color | flags.13?PeerColor | flags.13 | — | No description provided by the pinned schema. |
| button_text | string | — | — | No description provided by the pinned schema. |
| sponsor_info | flags.7?string | flags.7 | — | No description provided by the pinned schema. |
| additional_info | flags.8?string | flags.8 | — | No description provided by the pinned schema. |
| min_display_duration | flags.15?int | flags.15 | — | No description provided by the pinned schema. |
| max_display_duration | flags.15?int | flags.15 | — | No description provided by the pinned schema. |
| Parameter | Bit | Meaning |
|---|---|---|
| recommended | 5 | Controlled by flags; present when this bit is set. |
| can_report | 12 | Controlled by flags; present when this bit is set. |
| entities | 1 | Controlled by flags; present when this bit is set. |
| photo | 6 | Controlled by flags; present when this bit is set. |
| media | 14 | Controlled by flags; present when this bit is set. |
| color | 13 | Controlled by flags; present when this bit is set. |
| sponsor_info | 7 | Controlled by flags; present when this bit is set. |
| additional_info | 8 | Controlled by flags; present when this bit is set. |
| min_display_duration | 15 | Controlled by flags; present when this bit is set. |
| max_display_duration | 15 | Controlled by flags; present when this bit is set. |
Python binding
Section titled “Python binding”from miniproto.raw.types import SponsoredMessagePublic access: miniproto.raw.types.SponsoredMessage.
Safe usage shape
Section titled “Safe usage shape”from miniproto.raw.types import SponsoredMessage
# Naming the raw constructor class is local only; it performs no I/O or network request.constructor_type = SponsoredMessageResult family
Section titled “Result family”Relationships
Section titled “Relationships”- Result family:
SponsoredMessage - Accepted by:
messages.sponsoredMessages
Provenance
Section titled “Provenance”- layer: 228
- structural source:
tdlib - canonical schema: https://raw.githubusercontent.com/tdlib/td/refs/heads/master/td/generate/scheme/telegram_api.tl
- prose merge precedence: TDLib → Telegram Desktop → Core JSON
- source note: Canonical structure is the pinned TDLib telegram_api.tl; Layer 228 comes only from the matching Telegram Desktop end-of-file marker; core.telegram.org inputs enrich documentation and RPC error metadata without overriding structure.
Source-diff notes
Section titled “Source-diff notes”- tdlib_vs_core: changed_count=68; core_only_count=1; overlap_count=2302; tdlib_only_count=158
- tdlib_vs_tdesktop: changed_count=0; overlap_count=2448; tdesktop_only=null; tdlib_only=accessPointRule, ephemeral.editMessage, help.configSimple, inputPeerPhotoFileLocationLegacy, inputStickerSetThumbLegacy, invokeWithApnsSecretPrefix, invokeWithBusinessConnectionPrefix, invokeWithGooglePlayIntegrityPrefix, invokeWithReCaptchaPrefix, ipPort, ipPortSecret, updateEphemeralBotCallbackQuery