telegram api method · layer 229 · #e5b17f2b

bots.createBot

usable by users and bots

definition

bots.createBot#e5b17f2b flags:# via_deeplink:flags.0?true name:string username:string manager_id:InputUser = User;

parameters

nametypedescription
flags#Flags, see TL conditional fields
via_deeplinkflags.0?true
namestring
usernamestring
manager_idInputUser

returns

User

errors (9)

codeerrordescription
400BOT_CREATE_LIMIT_EXCEEDEDThe current user already owns the maximum allowed number of owned bots, as specified by `bots_create_limit_default` » and `bots_create_limit_premium` »; if the current user doesn't have Telegram Premium, upgrading to Premium will allow them to create more bots.
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.
400MANAGER_INVALIDThe specified manager bot is invalid.
400MANAGER_PERMISSION_MISSINGThe specified manager bot does not have the user.bot_can_manage_bots flag set.
400NAME_INVALIDThe specified bot name is invalid.
400USERNAME_INVALIDThe provided username is not valid.
400USERNAME_OCCUPIEDThe provided username is already occupied.
400USERNAME_SUFFIX_MISSINGThe required bot suffix is missing from the passed username.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 224–229

idlayers
#e5b17f2b224–229