telegram api method · layer 229 · #dcd914fd
bots.getBotInfo
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
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
bot | InputUser | If called by a user, must contain the peer of a bot we own. |
lang_code | string | Language code, if left empty this method will return the fallback about text and description. |
returns
errors (5)
| code | error | description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This 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. |
| 400 | LANG_CODE_INVALID | The specified language code is invalid. |
| 400 | USER_BOT_INVALID | User 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. |
| 401 | AUTH_KEY_UNREGISTERED | The 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×
| id | layers |
|---|---|
| #75ec12e6 | 154–156 |
| #dcd914fd | 158–229 |