There was a problem, I am making a business bot on aiogram, but I can not understand how to implement a connection check, I saw the following system in one bot, the bot asks to add itself as a chat bot and an inline button goes to the message when clicked on which it is checked, if the bot is added and has rights, it says that it was successful, if not, it gives an error, I tried to repeat but I do not understand how to get a business connection id through such a method. The only way I've found so far is to receive it via dp.business_message, but to receive it using this method, the person needs to write to someone in a private message. This is what the code looks like now @dp.business_message() async def handler_message(message: types.Message): print(message.business_connection_id) def verify_keyboard(): return InlineKeyboardMarkup( inline_keyboard=[ [InlineKeyboardButton( text="✅ Проверить подключение", callback_data="/verify" )] ] ) @dp.message(Command("start")) async def cmd_start(message: types.Message): text = ( " Подключите бота к вашему бизнес-аккаунту:\n\n" "1. В Telegram Business откройте <i>Настройки → Боты</i>\n" "2. Добавьте этого бота\n" "3. Нажмите кнопку ниже" ) await message.answer(text, reply_markup=verify_keyboard()) @dp.callback_query(lambda c: c.data == "/verify") async def verify_callback(callback: types.CallbackQuery): try: if callback.message.business_connection_id: business_id = callback.message.business_connection_id await callback.answer() await callback.message.edit_text( f" Подключение активно!\nID: <code>{business_id}</code>", reply_markup=verify_keyboard() ) else: await callback.answer() await callback.message.edit_text( " Бот не подключен к бизнес-аккаунту!", reply_markup=verify_keyboard() ) except Exception as e: await callback.answer(f"Error: {str(e)}", show_alert=True) Continue reading...