Skip to main content

channels.getParticipants

Get the participants of a supergroup/channel

func (c *Client) ChannelsGetParticipants(ctx context.Context, request *ChannelsGetParticipantsRequest) (ChannelsChannelParticipantsClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.ChannelsGetParticipants(ctx, &tg.ChannelsGetParticipantsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // ChannelsChannelParticipantsClass
return nil
})

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesChannel
FilterChannelParticipantsFilterClassyesWhich participant types to fetch
OffsetintyesOffset
LimitintyesLimit
Hashint64yesHash

Returns

ChannelsChannelParticipantsClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_MONOFORUM_UNSUPPORTEDMonoforums do not support this feature.
406CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
403CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400MSG_ID_INVALIDInvalid message ID provided.

References