Skip to main content

channels.getParticipant

Get info about a channel/supergroup participant

func (c *Client) ChannelsGetParticipant(ctx context.Context, request *ChannelsGetParticipantRequest) (*ChannelsChannelParticipant, error)

Calling this method

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

res, err := api.ChannelsGetParticipant(ctx, &tg.ChannelsGetParticipantRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ChannelsChannelParticipant
return nil
})

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesChannel/supergroup
ParticipantInputPeerClassyesParticipant to get info about

Returns

*ChannelsChannelParticipant

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
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.
400PARTICIPANT_ID_INVALIDThe specified participant ID is invalid.
400USER_ID_INVALIDThe provided user ID is invalid.
400USER_NOT_PARTICIPANTYou're not a member of this supergroup/channel.

References