account.updateConnectedBot

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

 Method schema is available as of layer 177. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
can_reply flags.0?true Whether the bot can reply to messages it receives from us, on behalf of us using the business connection.
deleted flags.1?true Whether to fully disconnect the bot from the current account.
bot InputUser The bot to connect or disconnect
recipients InputBusinessBotRecipients Configuration for the business connection

Result

Updates

Possible errors

Code Type Description
400 BOT_BUSINESS_MISSING The specified bot is not a business bot (the user.bot_business flag is not set).
400 BUSINESS_RECIPIENTS_EMPTY You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer.
403 PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.

Related pages

Business

Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start pages, chatbot support, and more.

user

Indicates info about a certain user.

Unless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

See here » for an implementation of the logic to use when updating the local user peer database.