getCreatedInviteLinks

Get the invite links created for a chat. User-only.

Parameters

chatId: ID

The identifier of the chat.

by?: ID

The identifier of an admin. If specified, only invite links created by this admin will be returned.

limit?: number

The maximum number of results to return. Must be in the range 1-100. Defaults to 100.

revoked?: boolean

Whether only revoked invite links must be returned.

afterDate?: Date

Only get the invite links created after a specific date.

Only get the invite links created after a specific invite link.

Result

The invite links created for the chat. This might be a subset of the results if they were less than limit. The parameters afterDate and afterInviteLink can be used for pagination.

Syntax

// Required parameters only.
await client.getCreatedInviteLinks(chatId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.getCreatedInviteLinks(chatId, {
    by,
    limit,
    revoked,
    afterDate,
    afterInviteLink,
});