telegram api method · layer 229 · #f8b036af

channels.getAdminedPublicChannels

usable by users

Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups.

definition

channels.getAdminedPublicChannels#f8b036af flags:# by_location:flags.0?true check_limit:flags.1?true for_personal:flags.2?true for_community_peer:flags.3?true = messages.Chats;

parameters

nametypedescription
flags#Flags, see TL conditional fields
by_locationflags.0?trueGet geogroups
check_limitflags.1?trueIf 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.checkUsername/channels.updateUsername.
for_personalflags.2?trueSet this flag to only fetch the full list of channels that may be passed to account.updatePersonalChannel to display them on our profile page.
for_community_peerflags.3?true

returns

messages.Chats

errors (4)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400CHANNELS_ADMIN_LOCATED_TOO_MUCHThe user has reached the limit of public geogroups.
400CHANNELS_ADMIN_PUBLIC_TOO_MUCHYou're admin of too many public channels, make some channels private to change the username of this channel.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 62–229 · constructor id changed 1×

idlayers
#8d8d82d762–101
#f8b036af102–229