bots.checkUsername #

Check whether a username is available and valid for use when creating a managed bot ».

Layer 223

Method schema is available as of layer 224. Switch »

Parameters #

NameTypeDescription
usernamestringUsername to check; only letters, digits and underscores are allowed, must end in bot, and the full username must be 5–32 characters long

Result #

Bool

Only users can use this method #

Possible errors #

CodeTypeDescription
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.

Managed bots #

Users can create managed bots (which are controlled by a specific manager bot) directly through the MTProto API, without interacting with @BotFather.