Layer 220
method Users
channels.getAdminedPublicChannels#f8b036af flags:# by_location:flags.0?true check_limit:flags.1?true for_personal:flags.2?true = messages.Chats;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
ByLocation flags.0?true Get geogroups
CheckLimit flags.1?true If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned. Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in channels. check Username / channels. update Username.
ForPersonal flags.2?true Set this flag to only fetch the full list of channels that may be passed to account. update Personal Channel to display them on our profile page.

Returns

messages.Chats

Possible Errors

Code Type Description
400 CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups.
400 CHANNELS_ADMIN_PUBLIC_TOO_MUCH You're admin of too many public channels, make some channels private to change the username of this channel.

Gogram Example

// ChannelsGetAdminedPublicChannels - using Params struct
result, err := client.ChannelsGetAdminedPublicChannels(&tg.ChannelsGetAdminedPublicChannelsParams{

    // Optional fields:
    // ByLocation: true,
    // CheckLimit: true,
    // ForPersonal: true,
})
if err != nil {
    // handle error
}
// result is *tg.MessagesChats