Extended user 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).
userFull#b9b12c6c flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector<PremiumGiftOption> wallpaper:flags.24?WallPaper stories:flags.25?PeerStories = UserFull;
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
blocked | flags.0?true | Whether you have blocked this user |
phone_calls_available | flags.4?true | Whether this user can make VoIP calls |
phone_calls_private | flags.5?true | Whether this user's privacy settings allow you to call them |
can_pin_message | flags.7?true | Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself |
has_scheduled | flags.12?true | Whether scheduled messages are available |
video_calls_available | flags.13?true | Whether the user can receive video calls |
voice_messages_forbidden | flags.20?true | Whether this user doesn't allow sending voice messages in a private chat with them |
translations_disabled | flags.23?true | Whether the real-time chat translation popup should be hidden. |
stories_pinned_available | flags.26?true | Whether this user has some pinned stories. |
blocked_my_stories_from | flags.27?true | Whether we've blocked this user, preventing them from seeing our stories ». |
wallpaper_overridden | flags.28?true | Whether the other user has chosen a custom wallpaper for us using messages.setChatWallPaper and the for_both flag, see here » for more info. |
contact_require_premium | flags.29?true | If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info. |
read_dates_private | flags.30?true | If set, we cannot fetch the exact read date of messages we send to this user using messages.getOutboxReadDate. The exact read date of messages might still be unavailable for other reasons, see here » for more info. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag. |
flags2 | # | Flags, see TL conditional fields |
sponsored_enabled | flags2.7?true | Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info. |
can_view_revenue | flags2.9?true | If set, this user can view ad revenue statistics » for this bot. |
bot_can_manage_emoji_status | flags2.10?true | If set, this is a bot that can change our emoji status » |
id | long | User ID |
about | flags.1?string | Bio of the user |
settings | PeerSettings | Peer settings |
personal_photo | flags.21?Photo | Personal profile photo, to be shown instead of profile_photo . |
profile_photo | flags.2?Photo | Profile photo |
fallback_photo | flags.22?Photo | Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo , due to privacy settings. |
notify_settings | PeerNotifySettings | Notification settings |
bot_info | flags.3?BotInfo | For bots, info about the bot (bot commands, etc) |
pinned_msg_id | flags.6?int | Message ID of the last pinned message |
common_chats_count | int | Chats in common with this user |
folder_id | flags.11?int | Peer folder ID, for more info click here |
ttl_period | flags.14?int | Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted. |
theme_emoticon | flags.15?string | Emoji associated with chat theme |
private_forward_name | flags.16?string | Anonymized text to be shown instead of the user's name on forwarded messages |
bot_group_admin_rights | flags.17?ChatAdminRights | A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them ». |
bot_broadcast_admin_rights | flags.18?ChatAdminRights | A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ». |
premium_gifts | flags.19?Vector<PremiumGiftOption> | Telegram Premium subscriptions gift options |
wallpaper | flags.24?WallPaper | Wallpaper to use in the private chat with the user. |
stories | flags.25?PeerStories | Active stories » |
business_work_hours | flags2.0?BusinessWorkHours | Telegram Business working hours ». |
business_location | flags2.1?BusinessLocation | Telegram Business location ». |
business_greeting_message | flags2.2?BusinessGreetingMessage | Telegram Business greeting message ». |
business_away_message | flags2.3?BusinessAwayMessage | Telegram Business away message ». |
business_intro | flags2.4?BusinessIntro | Specifies a custom Telegram Business profile introduction ». |
birthday | flags2.5?Birthday | Contains info about the user's birthday ». |
personal_channel_id | flags2.6?long | ID of the associated personal channel », that should be shown in the profile page. |
personal_channel_message | flags2.6?int | ID of the latest message of the associated personal channel », that should be previewed in the profile page. |
stargifts_count | flags2.8?int | Number of gifts the user has chosen to display on their profile |
starref_program | flags2.11?StarRefProgram | This bot has an active referral program » |
Telegram allows scheduling messages
Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.
Telegram users and channels can easily post and view stories through the API.
Working with the blocklist.
Set a custom wallpaper » in a specific private chat with another user.
Telegram apps support generating, sharing and synchronizing chat backgrounds.
Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.
Set global privacy settings
Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.
Get the exact read date of one of our messages, sent to a private chat with another user.
Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».
If the peer
's userFull.read_dates_private
flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED
RPC error will be emitted.
The exact read date of messages might still be unavailable for other reasons, see here » for more info.
To set userFull.read_dates_private
for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks
flag.
Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.
Telegram has one of the most generous reward systems in the history of social media. Telegram channel and bot owners can now receive 50% of the revenue from ads displayed in their channels and bots. This page describes the methods used to withdraw channel/bot ad revenue, as well as view detailed revenue stats.
Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.
Telegram allows pinning multiple messages on top of a specific chat.
Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.
How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.
Telegram offers many customization options for your profile!
How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.
Users can send Gifts to their friends. The recipients of gifts can display them on their profile pages or turn them into Telegram Stars ». Telegram Stars can be used for many things, including supporting creators and buying services in mini apps.
Developers can open affiliate programs for their mini app – allowing content creators, other mini app developers and any Telegram user to promote it and earn commissions on purchases made by people they referred.
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.