Skip to content

revokeChatInviteLink

Returns ChatInviteLink

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.

Required: chat_id, invite_link

Try it
Token saved
Response

TypeScript example · @effect-ak/tg-bot-client
import { makeTgBotClient } from "@effect-ak/tg-bot-client"
const client = makeTgBotClient({ bot_token: "YOUR_BOT_TOKEN" })
const result = await client.execute("revoke_chat_invite_link", {
chat_id: "YOUR_CHAT_ID",
invite_link: "..."
})

Parameters

chat_id number | string Required
Unique identifier of the target chat or username of the target channel (in the format @channelusername).

invite_link string Required
The invite link to revoke.