Layer 220
ChannelsGetAdminLog
Get the admin log of a channel/supergroup
method
Users
channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector<InputUser> max_id:long min_id:long limit:int = channels.AdminLogResults;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Channel | InputChannel | Channel |
| Q | string | Search query, can be empty |
| EventsFilter | flags.0?ChannelAdminLogEventsFilter | Event filter |
| Admins | Vector<InputUser> | Only show events from these admins |
| MaxId | long | Maximum ID of message to return (see pagination ) |
| MinId | long | Minimum ID of message to return (see pagination ) |
| Limit | int | Maximum number of results to return, see pagination |
Returns
channels.AdminLogResultsPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 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. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
Gogram Example
// ChannelsGetAdminLog - using Params struct result, err := client.ChannelsGetAdminLog(&tg.ChannelsGetAdminLogParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, Q: "...", MaxId: int64(0), MinId: int64(0), Limit: 0, // Optional fields: // EventsFilter: &tg.ChannelAdminLogEventsFilter{}, // Admins: []tg.InputUser{&tg.InputUserSelf{}}, }) if err != nil { // handle error } // result is *tg.ChannelsAdminLogResults