telegram api method · layer 229 · #66a08c7e

account.updateConnectedBot

usable by users

Connect a business bot » to the current account, or to change the current connection settings.

definition

account.updateConnectedBot#66a08c7e flags:# deleted:flags.1?true rights:flags.0?BusinessBotRights bot:InputUser recipients:InputBusinessBotRecipients = Updates;

parameters

nametypedescription
flags#Flags, see TL conditional fields
deletedflags.1?trueWhether to fully disconnect the bot from the current account.
rightsflags.0?BusinessBotRightsBusiness bot rights.
botInputUserThe bot to connect or disconnect
recipientsInputBusinessBotRecipientsConfiguration for the business connection

returns

Updates

errors (4)

codeerrordescription
400BOT_BUSINESS_MISSINGThe specified bot is not a business bot (the user.bot_business flag is not set).
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.
400BUSINESS_RECIPIENTS_EMPTYYou didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with *any* peer.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 176–229 · constructor id changed 2×

idlayers
#9c2d527d176
#43d8521d177–200
#66a08c7e201–229