telegram api method · layer 229 · #dcd914fd

bots.getBotInfo

usable by users and bots

Get localized name, about text and description of a bot (or of the current account, if called by a bot).

definition

bots.getBotInfo#dcd914fd flags:# bot:flags.0?InputUser lang_code:string = bots.BotInfo;

parameters

nametypedescription
flags#Flags, see TL conditional fields
botflags.0?InputUserIf called by a user, must contain the peer of a bot we own.
lang_codestringLanguage code, if left empty this method will return the fallback about text and description.

returns

bots.BotInfo

errors (5)

codeerrordescription
400BOT_INVALIDThis is not a valid bot.
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.
400LANG_CODE_INVALIDThe specified language code is invalid.
400USER_BOT_INVALIDUser accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

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

idlayers
#75ec12e6154–156
#dcd914fd158–229