api.createChatInviteLink()
Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
Parameters
CreateChatInviteLinkParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
chatId | number | Chat identifier |
name | string | Invite link name; 0-32 characters |
expirationDate | number | Point in time (Unix timestamp) when the link will expire; pass 0 if never |
memberLimit | number | The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited |
createsJoinRequest | boolean | True, if the link only creates join request. If true, member_limit must not be specified |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'createChatInviteLink' | 'error'
airgram: Airgram
request: {
method: 'createChatInviteLink'
params: CreateChatInviteLinkParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}