telegram api method · layer 229 · #a455de90
messages.exportChatInvite
Export an invite link for a chat
definition
messages.exportChatInvite#a455de90 flags:# legacy_revoke_permanent:flags.2?true request_needed:flags.3?true peer:InputPeer expire_date:flags.0?int usage_limit:flags.1?int title:flags.4?string subscription_pricing:flags.5?StarsSubscriptionPricing = ExportedChatInvite;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
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 | Maximum number of users that can join using this link |
title | string | Description of the invite link, visible only to administrators |
subscription_pricing | StarsSubscriptionPricing | For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel. |
returns
errors (15)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_MONOFORUM_UNSUPPORTED | 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. |
| 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 is invalid, the maximum price is specified in the `stars_subscription_amount_max` config key ». |
| 400 | SUBSCRIPTION_PERIOD_INVALID | The specified subscription_pricing.period is invalid. |
| 400 | USAGE_LIMIT_INVALID | The specified usage limit is invalid. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
history
present in layers 46–229 · constructor id changed 4×
| id | layers |
|---|---|
| #7d885289 | 46–92 |
| #0df7534c | 93–123 |
| #14b9bcd7 | 124–133 |
| #a02ce5d5 | 134–185 |
| #a455de90 | 186–229 |