Skip to content

createChatSubscriptionInviteLink

Returns ChatInviteLink

Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink.

Required: chat_id, subscription_period, subscription_price · Optional: 1 parameters

Limits:

  • name: 0-32 characters
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("create_chat_subscription_invite_link", {
chat_id: "YOUR_CHAT_ID",
subscription_period: 0,
subscription_price: 0
})

Parameters

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

subscription_period number Required
The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).

subscription_price number Required
The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000.

name string
Invite link name; 0-32 characters.

createChatInviteLink · createForumTopic · createInvoiceLink · createNewStickerSet