Skip to content

Action: chat info

Use this action to obtain information about any Telegram chat, including users, bots, channels, or groups, using its Telegram ID or @username. The data returned about the analyzed chat can be accessed through the #ID# of this action and used in subsequent actions.

Options of the action:

  • Set chat: The ID or @username of any Telegram chat. If it's a user, it doesn't need to be connected to your bot.

What does the action return through its ID?

  • id: Chat ID.
  • type: Chat type, which can be user, bot, channel, or group.
  • is_verified: Only for groups, channels, and bots. Returns True if the chat has been verified by Telegram. Otherwise, returns False.
  • is_restricted: Only for groups, channels, and bots. Returns True if the chat has been restricted, otherwise returns False. Check restrictions for more details.
  • is_scam: Returns True if the chat has been labeled as a scam, otherwise returns False.
  • is_fake: Returns True if the chat has been labeled as fake, otherwise returns False.
  • is_support: Only for users and bots. Returns True if the chat is part of Telegram's support team, otherwise returns False.
  • title: Only for groups and channels. Returns its name.
  • username: Returns the username of users, bots, groups, and channels, if available.
  • first_name: Only for users and bots. Returns their first name.
  • last_name: Only for users. Returns their last name.
  • photo: Returns the file_id of the profile photo, if available.
  • bio: User's bio.
  • description: Group or channel description.
  • has_protected_content: Returns True if chat messages cannot be forwarded to other chats, otherwise returns False.
  • invite_link: Group or channel invite link.
  • pinned_message: Pinned message of the group, channel, or own chat.
  • sticker_set_name: Name of the sticker set in the group.
  • can_set_sticker_set: Returns True if the bot can change the sticker set in the group, otherwise returns False.
  • members_count: Number of members in the group or channel.
  • restrictions: Reasons why the chat might not be available to some users, separated by commas. This field is only available if is_restricted is True.
  • linked_chat: Linked group (for channels) or linked channel (for groups).
  • available_reactions: Reactions available in the chat, separated by commas.
  • permissions.can_send_messages: Returns True if the bot is allowed to send text messages, contacts, locations, and venues, otherwise returns False.
  • permissions.can_send_media_messages: Returns True if the bot is allowed to send audios, documents, photos, videos, video notes, and voice notes. Includes can_send_messages. Otherwise, returns False.
  • permissions.can_send_other_messages: Returns True if the bot can send animations, games, stickers, and use inline bots. Includes can_send_media_messages. Otherwise, returns False.
  • permissions.can_send_polls: Returns True if the bot has permission to send polls. Includes can_send_messages. Otherwise, returns False.
  • permissions.can_add_web_page_previews: Returns True if the bot can add web page previews to its messages. Includes can_send_media_messages. Otherwise, returns False.
  • permissions.can_change_info: Returns True if the bot can change the chat title, photo, and other settings. Ignored in public supergroups. Otherwise, returns False.
  • permissions.can_invite_users: Returns True if the bot can invite new users to the chat, otherwise returns False.
  • permissions.can_pin_messages: Returns True if the bot can pin messages. Ignored in public groups. Otherwise, returns False.
  • user.id: Only for users connected to the bot. Returns their ID.
  • user.first_name: Only for users connected to the bot. Returns their first name.
  • user.last_name: Only for users connected to the bot. Returns their last name.
  • user.username: Only for users connected to the bot. Returns their username.
  • user.language_code: Only for users connected to the bot. Returns their language code in ISO 639-1 format.
  • user.ref_link: Only for users connected to the bot. Returns their referral link.
  • user.ref_by: Only for users connected to the bot. ID of the person who referred the user (referrer), if any. Otherwise, returns None.
  • user.ref_count: Only for users connected to the bot. Returns the number of referrals attracted through their referral link.
  • user.ref_list: Only for users connected to the bot. List of all the user's referrals, in cursor format. Use the loop() function to display them.
  • user.is_new: Only for users connected to the bot. Returns True if the user is new to the bot, or False if not. A user is considered new if they haven't gone through all the actions of /start; once they reach the main menu, is_new will be False.
  • user.is_active: Only for users connected to the bot. Returns True if the user is active on the bot, or False if not. A user is considered active if they haven't deleted the bot.
  • user.is_banned: Only for users connected to the bot. Returns True if the user is banned from the bot, or False if not.
  • user.is_admin: Only for users connected to the bot. Returns True if the user is an admin of the bot, or False if not.
  • user.date_joined: Only for users connected to the bot. Date when the user joined the bot. Use the date_format() function to represent it in your preferred format.
  • user.last_seen: Only for users connected to the bot. Date when the user was last seen on the bot. Use the date_format() function to represent it in your preferred format.
  • user.variables.(variable_name): Only for users connected to the bot. Replace (variable_name) with the user's variable you want to view.