Channel/supergroup info
When updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).
The only exception to the above rule is when the min
flag is set, in which case only the following fields must be applied over any locally stored version:
title
megagroup
color
photo
username
usernames
has_geo
noforwards
emoji_status
has_link
slow_mode_enabled
scam
fake
gigagroup
forum
level
restricted
restriction_reason
join_to_send
join_request
is_verified
default_banned_rights
signature_profiles
autotranslation
broadcast_messages_allowed
monoforum
forum_tabs
linked_monoforum_id
send_paid_messages_stars
bot_verification_icon
See here » for an implementation of the logic to use when updating the local user peer database.
Constructor schema is available as of layer 41. Switch »
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
creator | flags.0?true | Whether the current user is the creator of this channel |
left | flags.2?true | Whether the current user has left or is not a member of this channel |
broadcast | flags.5?true | Is this a channel? |
verified | flags.7?true | Is this channel verified by telegram? |
megagroup | flags.8?true | Is this a supergroup? Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
restricted | flags.9?true | Whether viewing/writing in this channel for a reason (see restriction_reason ) |
signatures | flags.11?true | Whether signatures are enabled (channels) |
min | flags.12?true | See min |
scam | flags.19?true | This channel/supergroup is probably a scam Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
has_link | flags.20?true | Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in channelFull.linked_chat_id . Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
has_geo | flags.21?true | Whether this chanel has a geoposition |
slowmode_enabled | flags.22?true | Whether slow mode is enabled for groups to prevent flood in chat. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
call_active | flags.23?true | Whether a group call or livestream is currently active |
call_not_empty | flags.24?true | Whether there's anyone in the group call or livestream |
fake | flags.25?true | If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
gigagroup | flags.26?true | Whether this supergroup is a gigagroup Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
noforwards | flags.27?true | Whether this channel or group is protected, thus does not allow forwarding messages from it |
join_to_send | flags.28?true | Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
join_request | flags.29?true | Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSend Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
forum | flags.30?true | Whether this supergroup is a forum. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
flags2 | # | Flags, see TL conditional fields |
stories_hidden | flags2.1?true | Whether we have hidden all stories posted by this channel ». |
stories_hidden_min | flags2.2?true | If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using channels.getChannels to obtain the latest value of the stories_hidden flag. |
stories_unavailable | flags2.3?true | No stories from the channel are visible. |
signature_profiles | flags2.12?true | If set, messages sent by admins to this channel will link to the admin's profile (just like with groups). |
autotranslation | flags2.15?true | If set, autotranslation was enabled for all users by the admin of the channel, as specified here ». |
broadcast_messages_allowed | flags2.16?true | If set, this channel has an associated monoforum », and its ID is specified in the linked_monoforum_id flag. |
monoforum | flags2.17?true | If set, this is a monoforum », and the ID of the associated channel is specified in the linked_monoforum_id . |
forum_tabs | flags2.19?true | If set, enables the tabbed forum UI ». |
id | long | ID of the channel, see here » for more info and the available ID range. |
access_hash | flags.13?long | Access hash, see here » for more info |
title | string | Title |
username | flags.6?string | Main active username. |
photo | ChatPhoto | Profile photo |
date | int | Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date |
restriction_reason | flags.9?Vector<RestrictionReason> | Contains the reason why access to this channel must be restricted. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
admin_rights | flags.14?ChatAdminRights | Admin rights of the user in this channel (see rights) |
banned_rights | flags.15?ChatBannedRights | Banned rights of the user in this channel (see rights) |
default_banned_rights | flags.18?ChatBannedRights | Default chat rights (see rights) |
participants_count | flags.17?int | Participant count |
usernames | flags2.0?Vector<Username> | Additional usernames |
stories_max_id | flags2.4?int | ID of the maximum read story. |
color | flags2.7?PeerColor | The channel's accent color. |
profile_color | flags2.8?PeerColor | The channel's profile color. |
emoji_status | flags2.9?EmojiStatus | Emoji status |
level | flags2.10?int | Boost level. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info. |
subscription_until_date | flags2.11?int | Expiration date of the Telegram Star subscription » the current user has bought to gain access to this channel. |
bot_verification_icon | flags2.13?long | Describes a bot verification icon ». |
send_paid_messages_stars | flags2.14?long | If set, this supergroup or monoforum has enabled paid messages », we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check channelFull.send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here » for the full flow (only set for the monoforum, not the associated channel). |
linked_monoforum_id | flags2.18?long | For channels with associated monoforums, the monoforum ID. For Monoforums, the ID of the associated channel. |
Full info about a channel, supergroup or gigagroup.
When updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).
Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.
In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.
Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.
How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.
Set whether all users should join a discussion group in order to comment on a post »
Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
Set whether all users should request admin approval to join the group ».
Telegram allows creating forums with multiple distinct topics.
Telegram users and channels can easily post and view stories through the API.
Get info about channels/supergroups
Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.
Telegram supports direct messages to channels, which can also be used to suggest (even paid) channel posts.
How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.
Telegram users and channels can change the accent color and background pattern of their profile page and their messages!
Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.
Telegram Premium users can grant their favorite channels and supergroups additional features like the ability to post stories by giving them boosts.
Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.
To further improve transparency on Telegram, official third-party services are able to assign extra verification icons to user accounts and chats — in order to prevent scams and reduce misinformation.
Telegram Stars can be used to pay for sending messages to users, supergroups and channels that have configured paid messages, requiring a payment for every message sent to them.