Contents Menu Expand Light mode Dark mode Auto light/dark mode Skip to content
banana documentation
banana documentation
  • User Guide
    • Quick start
    • Basic: agents
      • WinAPI-based agents
      • cpr-based agents
      • boost::beast-based agents
      • cpp-httplib-based agents
  • API Reference
    • Banana API
      • Banana Basic Types
      • Banana Agents
        • WinAPI-based agents
        • cpr-based agents
        • boost::beast-based agents
        • cpp-httplib-based agents
    • Telegram API
      • Telegram Types
        • animation_t
        • audio_t
        • bot_command_scope_all_chat_administrators_t
        • bot_command_scope_all_group_chats_t
        • bot_command_scope_all_private_chats_t
        • bot_command_scope_chat_administrators_t
        • bot_command_scope_chat_member_t
        • bot_command_scope_chat_t
        • bot_command_scope_default_t
        • bot_command_scope_t
        • bot_command_t
        • bot_description_t
        • bot_name_t
        • bot_short_description_t
        • callback_game_t
        • callback_query_t
        • chat_administrator_rights_t
        • chat_boost_added_t
        • chat_boost_removed_t
        • chat_boost_source_gift_code_t
        • chat_boost_source_giveaway_t
        • chat_boost_source_premium_t
        • chat_boost_source_t
        • chat_boost_t
        • chat_boost_updated_t
        • chat_invite_link_t
        • chat_join_request_t
        • chat_location_t
        • chat_member_administrator_t
        • chat_member_banned_t
        • chat_member_left_t
        • chat_member_member_t
        • chat_member_owner_t
        • chat_member_restricted_t
        • chat_member_t
        • chat_member_updated_t
        • chat_permissions_t
        • chat_photo_t
        • chat_shared_t
        • chat_t
        • chosen_inline_result_t
        • contact_t
        • dice_t
        • document_t
        • encrypted_credentials_t
        • encrypted_passport_element_t
        • external_reply_info_t
        • file_t
        • force_reply_t
        • forum_topic_closed_t
        • forum_topic_created_t
        • forum_topic_edited_t
        • forum_topic_reopened_t
        • forum_topic_t
        • game_high_score_t
        • game_t
        • general_forum_topic_hidden_t
        • general_forum_topic_unhidden_t
        • giveaway_completed_t
        • giveaway_created_t
        • giveaway_t
        • giveaway_winners_t
        • inaccessible_message_t
        • inline_keyboard_button_t
        • inline_keyboard_markup_t
        • inline_query_result_article_t
        • inline_query_result_audio_t
        • inline_query_result_cached_audio_t
        • inline_query_result_cached_document_t
        • inline_query_result_cached_gif_t
        • inline_query_result_cached_mpeg4_gif_t
        • inline_query_result_cached_photo_t
        • inline_query_result_cached_sticker_t
        • inline_query_result_cached_video_t
        • inline_query_result_cached_voice_t
        • inline_query_result_contact_t
        • inline_query_result_document_t
        • inline_query_result_game_t
        • inline_query_result_gif_t
        • inline_query_result_location_t
        • inline_query_result_mpeg4_gif_t
        • inline_query_result_photo_t
        • inline_query_result_t
        • inline_query_result_venue_t
        • inline_query_result_video_t
        • inline_query_result_voice_t
        • inline_query_results_button_t
        • inline_query_t
        • input_contact_message_content_t
        • input_file_t
        • input_invoice_message_content_t
        • input_location_message_content_t
        • input_media_animation_t
        • input_media_audio_t
        • input_media_document_t
        • input_media_photo_t
        • input_media_t
        • input_media_video_t
        • input_message_content_t
        • input_sticker_t
        • input_text_message_content_t
        • input_venue_message_content_t
        • invoice_t
        • keyboard_button_poll_type_t
        • keyboard_button_request_chat_t
        • keyboard_button_request_users_t
        • keyboard_button_t
        • labeled_price_t
        • link_preview_options_t
        • location_t
        • login_url_t
        • mask_position_t
        • maybe_inaccessible_message_t
        • menu_button_commands_t
        • menu_button_default_t
        • menu_button_t
        • menu_button_web_app_t
        • message_auto_delete_timer_changed_t
        • message_entity_t
        • message_id_t
        • message_origin_channel_t
        • message_origin_chat_t
        • message_origin_hidden_user_t
        • message_origin_t
        • message_origin_user_t
        • message_reaction_count_updated_t
        • message_reaction_updated_t
        • message_t
        • order_info_t
        • passport_data_t
        • passport_element_error_data_field_t
        • passport_element_error_file_t
        • passport_element_error_files_t
        • passport_element_error_front_side_t
        • passport_element_error_reverse_side_t
        • passport_element_error_selfie_t
        • passport_element_error_t
        • passport_element_error_translation_file_t
        • passport_element_error_translation_files_t
        • passport_element_error_unspecified_t
        • passport_file_t
        • photo_size_t
        • poll_answer_t
        • poll_option_t
        • poll_t
        • pre_checkout_query_t
        • proximity_alert_triggered_t
        • reaction_count_t
        • reaction_type_custom_emoji_t
        • reaction_type_emoji_t
        • reaction_type_t
        • reply_keyboard_markup_t
        • reply_keyboard_remove_t
        • reply_parameters_t
        • response_parameters_t
        • sent_web_app_message_t
        • shipping_address_t
        • shipping_option_t
        • shipping_query_t
        • sticker_set_t
        • sticker_t
        • story_t
        • successful_payment_t
        • switch_inline_query_chosen_chat_t
        • text_quote_t
        • update_t
        • user_chat_boosts_t
        • user_profile_photos_t
        • user_t
        • users_shared_t
        • venue_t
        • video_chat_ended_t
        • video_chat_participants_invited_t
        • video_chat_scheduled_t
        • video_chat_started_t
        • video_note_t
        • video_t
        • voice_t
        • web_app_data_t
        • web_app_info_t
        • webhook_info_t
        • write_access_allowed_t
      • Telegram Methods
        • add_sticker_to_set
        • answer_callback_query
        • answer_inline_query
        • answer_pre_checkout_query
        • answer_shipping_query
        • answer_web_app_query
        • approve_chat_join_request
        • ban_chat_member
        • ban_chat_sender_chat
        • close
        • close_forum_topic
        • close_general_forum_topic
        • copy_message
        • copy_messages
        • create_chat_invite_link
        • create_forum_topic
        • create_invoice_link
        • create_new_sticker_set
        • decline_chat_join_request
        • delete_chat_photo
        • delete_chat_sticker_set
        • delete_forum_topic
        • delete_message
        • delete_messages
        • delete_my_commands
        • delete_sticker_from_set
        • delete_sticker_set
        • delete_webhook
        • edit_chat_invite_link
        • edit_forum_topic
        • edit_general_forum_topic
        • edit_message_caption
        • edit_message_live_location
        • edit_message_media
        • edit_message_reply_markup
        • edit_message_text
        • export_chat_invite_link
        • forward_message
        • forward_messages
        • get_chat
        • get_chat_administrators
        • get_chat_member
        • get_chat_member_count
        • get_chat_menu_button
        • get_custom_emoji_stickers
        • get_file
        • get_forum_topic_icon_stickers
        • get_game_high_scores
        • get_me
        • get_my_commands
        • get_my_default_administrator_rights
        • get_my_description
        • get_my_name
        • get_my_short_description
        • get_sticker_set
        • get_updates
        • get_user_chat_boosts
        • get_user_profile_photos
        • get_webhook_info
        • hide_general_forum_topic
        • leave_chat
        • log_out
        • pin_chat_message
        • promote_chat_member
        • reopen_forum_topic
        • reopen_general_forum_topic
        • restrict_chat_member
        • revoke_chat_invite_link
        • send_animation
        • send_audio
        • send_chat_action
        • send_contact
        • send_dice
        • send_document
        • send_game
        • send_invoice
        • send_location
        • send_media_group
        • send_message
        • send_photo
        • send_poll
        • send_sticker
        • send_venue
        • send_video
        • send_video_note
        • send_voice
        • set_chat_administrator_custom_title
        • set_chat_description
        • set_chat_menu_button
        • set_chat_permissions
        • set_chat_photo
        • set_chat_sticker_set
        • set_chat_title
        • set_custom_emoji_sticker_set_thumbnail
        • set_game_score
        • set_message_reaction
        • set_my_commands
        • set_my_default_administrator_rights
        • set_my_description
        • set_my_name
        • set_my_short_description
        • set_passport_data_errors
        • set_sticker_emoji_list
        • set_sticker_keywords
        • set_sticker_mask_position
        • set_sticker_position_in_set
        • set_sticker_set_thumbnail
        • set_sticker_set_title
        • set_webhook
        • stop_message_live_location
        • stop_poll
        • unban_chat_member
        • unban_chat_sender_chat
        • unhide_general_forum_topic
        • unpin_all_chat_messages
        • unpin_all_forum_topic_messages
        • unpin_all_general_forum_topic_messages
        • unpin_chat_message
        • upload_sticker_file
Versions
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • master
Back to top

export_chat_invite_link¶

template<class Agent>
api_result<string_t, Agent&&> export_chat_invite_link(Agent &&agent, export_chat_invite_link_args_t args)¶
template<class Agent, class F>
void export_chat_invite_link(Agent &&agent, export_chat_invite_link_args_t args, F &&callback)¶

agent is any object satisfying agent concept.

callback is any callable object accepting expected<string_t>.

Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.

struct export_chat_invite_link_args_t¶

Arguments that should be passed to export_chat_invite_link().

variant_t<integer_t, string_t> chat_id¶

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

Next
forward_message
Previous
edit_message_text
Copyright © 2020-2024
Made with Sphinx and @pradyunsg's Furo
On this page
  • export_chat_invite_link
    • export_chat_invite_link()
    • export_chat_invite_link()
    • export_chat_invite_link_args_t
      • export_chat_invite_link_args_t::chat_id