Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# BusinessConnection

class telegram.BusinessConnection(id, user, user_chat_id, date, can_reply, is_enabled, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  Describes the connection of the bot with a business account.

  Objects of this class are comparable in terms of equality. Two objects of this class are considered equal if their `id`, `user`, `user_chat_id`, `date`, `can_reply`, and `is_enabled` are equal.

  Available In

  `telegram.Update.business_connection`

  Returned In

  `telegram.Bot.get_business_connection()`

  Added in version 21.1.

  Parameters:

    - id (`str`) – Unique identifier of the business connection.

    - user (`telegram.User`) – Business account user that created the business connection.

    - user_chat_id (`int`) – Identifier of a private chat with the user who created the business connection.

    - date (`datetime.datetime`) – Date the connection was established in Unix time.

    - can_reply (`bool`) – True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours.

    - is_enabled (`bool`) – True, if the connection is active.

  id

    Unique identifier of the business connection.

    Type:

      `str`

  user

    Business account user that created the business connection.

    Type:

      `telegram.User`

  user_chat_id

    Identifier of a private chat with the user who created the business connection.

    Type:

      `int`

  date

    Date the connection was established in Unix time.

    Type:

      `datetime.datetime`

  can_reply

    True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours.

    Type:

      `bool`

  is_enabled

    True, if the connection is active.

    Type:

      `bool`

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.