peyk.platforms.telegram.methods.export_chat_invite_link¶
- async peyk.platforms.telegram.methods.export_chat_invite_link(self, chat_id: int | str) str[source]¶
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. Note: Each administrator in a chat generates their own invite links. Bots can’t use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.
- Parameters:
chat_id – Unique identifier for the target chat or username of the target channel in the format @username
- Returns:
Result returned by Telegram on successful execution.
- Return type:
str