Skip to main content

channels.getAdminLog

Get the admin log of a channel/supergroup

func (c *Client) ChannelsGetAdminLog(ctx context.Context, request *ChannelsGetAdminLogRequest) (*ChannelsAdminLogResults, error)

Calling this method​

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

res, err := api.ChannelsGetAdminLog(ctx, &tg.ChannelsGetAdminLogRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ChannelsAdminLogResults
return nil
})

Parameters​

NameTypeRequiredDescription
ChannelInputChannelClassyesChannel
QstringyesSearch query, can be empty
EventsFilterChannelAdminLogEventsFilter—Event filter
Admins[]InputUserClass—Only show events from these admins
MaxIDint64yesMaximum ID of message to return (see pagination)
MinIDint64yesMinimum ID of message to return (see pagination)
LimitintyesMaximum number of results to return, see pagination

Returns​

*ChannelsAdminLogResults

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.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400MSG_ID_INVALIDInvalid message ID provided.

References​