# exportChatInviteLink

Source: https://core.telegram.org/bots/api#exportchatinvitelink

[Documentation index](../llms.txt)

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.

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| chat\_id | Integer or String | Yes | Unique identifier for the target chat or username of the target channel in the format `@username` |

> 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](exportchatinvitelink.md) or by calling the [getChat](getchat.md) method. If your bot needs to generate a new primary invite link replacing its previous one, use [exportChatInviteLink](exportchatinvitelink.md) again.
