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
| Name | Type | Required | Description |
|---|---|---|---|
Channel | InputChannelClass | yes | Channel |
Filter | ChannelParticipantsFilterClass | yes | Which participant types to fetch |
Offset | int | yes | Offset |
Limit | int | yes | Limit |
Hash | int64 | yes | Hash |
Returns
ChannelsChannelParticipantsClass
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_MONOFORUM_UNSUPPORTED | Monoforums do not support this feature. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 403 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.getParticipants#77ced9d0