messages.exportChatInvite
Export an invite link for a chat
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
legacy_revoke_permanent | true | لأ | Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients. |
request_needed | true | لأ | Whether admin confirmation is required before admitting each separate user into the chat |
peer | InputPeer | أيوه | Chat |
expire_date | int | لأ | Expiration date |
usage_limit | int | لأ | الحد الأقصى لعدد المستخدمين الذين يمكنهم الانضمام باستخدام هذا الرابط |
title | string | لأ | Description of the invite link, visible only to administrators |
subscription_pricing | StarsSubscriptionPricing | لأ | بالنسبة لـ [اشتراكات Telegram Star »](https://core.telegram.org/api/stars.md#star-subscriptions)، تحتوي على أسعار الاشتراك الذي يجب على المستخدم تفعيله للانضمام إلى القناة الخاصة. |
الردود
ExportedChatInvite
MTProto RPC
- 400 · CHANNEL_INVALID — The provided channel is invalid.
- 400 · CHANNEL_MONOFORUM_UNSUPPORTED — [Monoforums](https://core.telegram.org/api/channel.md#monoforums) do not support this feature.
- 400 · CHANNEL_PRIVATE — You haven't joined this channel/supergroup.
- 400 · CHAT_ADMIN_REQUIRED — You must be an admin in this chat to do this.
- 400 · CHAT_ID_INVALID — The provided chat id is invalid.
- 403 · CHAT_WRITE_FORBIDDEN — You can't write in this chat.
- 400 · EXPIRE_DATE_INVALID — The specified expiration date is invalid.
- 400 · INPUT_USER_DEACTIVATED — The specified user was deleted.
- 400 · MSG_ID_INVALID — Invalid message ID provided.
- 400 · PEER_ID_INVALID — The provided peer id is invalid.
- 400 · PRICING_CHAT_INVALID — The pricing for the [subscription](https://core.telegram.org/api/subscriptions.md) is invalid, the maximum price is specified in the [stars_subscription_amount_max config key »](https://core.telegram.org/api/config.md#stars-subscription-amount-max).
- 400 · SUBSCRIPTION_PERIOD_INVALID — The specified subscription_pricing.period is invalid.
- 400 · USAGE_LIMIT_INVALID — The specified usage limit is invalid.