Integrating BigBlueButton Webhook: Troubleshooting IncompleteRead

I’m trying to integrate a webhook with BigBlueButton (BBB) after successfully creating a meeting via the BBB API. However, when attempting to register the webhook, I encounter an IncompleteRead(0 bytes read) error.

My Code:
@login_required
def CreateEventsByBBB():
try:
if g.role == ‘teacher’:
data = request.get_json()

        q = Classroom.query.filter(Classroom.teacher_id == g.user_id).all()

        check = 0  # to check if client 'classroom_id' is actually in the classroom table corresponding to teacher_id
        for elem in q:
            if elem.id == int(data['classroom_id']):
                check = 1

        if data['event_name'] != '' and data['event_desc'] != '' and check:

            if 'link' not in data:
                data['link'] = None

            if 'password' not in data:
                data['password'] = None

            if 'demo' not in data:
                data['demo'] = None

            if 'end_timestamp' not in data:
                data['end_timestamp'] = None

            if data['external_link_check'] == False:
                eventName = data['event_name']
                replacedEventName = eventName.replace(' ', '_')
                meetingID = replacedEventName + str(int(datetime.now().timestamp() * 1000))

                # Define your parameters for creating the meeting
                create_params = {
                    'allowStartStopRecording': 'true',
                    'attendeePW': 'ap',
                    'autoStartRecording': 'false',
                    'meetingID': meetingID,
                    'moderatorPW': 'mp',
                    'name': meetingID,
                    'record': 'false',
                }

                # Construct the query string for checksum calculation
                query_string = '&'.join([f"{key}={value}" for key, value in create_params.items()])
                shared_secret = current_app.config['BBB_SHARED_SECRET']

                # Calculate the checksum
                checksum_string = f"create{query_string}{shared_secret}"
                checksum = sha1(checksum_string.encode()).hexdigest()

                # Add the checksum to the parameters
                create_params['checksum'] = checksum

                # Construct the URL with parameters
                url = current_app.config['BIGBLUEBUTTON_PATH'] + 'create?' + '&'.join([f"{key}={value}" for key, value in create_params.items()])
                response = requests.get(url, verify=False)
                print(meetingID, url, response)

                # Define your parameters for webhook
                webhook_create_param = {
                    'callbackURL': 'https://examcourse.medhasvi.com/webhook',
                    'meetingID': meetingID
                }

                webhook_query_string = '&'.join([f"{key}={value}" for key, value in webhook_create_param.items()])
                webhook_checksum_string = f"hooks/create{webhook_query_string}{shared_secret}"
                webhook_checksum = sha1(webhook_checksum_string.encode()).hexdigest()
                webhook_create_param['checksum'] = webhook_checksum
                print("webhook_create_param checksum = ", webhook_checksum)

                hook_create_url = current_app.config['BIGBLUEBUTTON_PATH'] + 'hooks/create?' + urlencode(webhook_create_param)
                print(hook_create_url)
                response = requests.get(hook_create_url)
                # print("Webhook Response = ", response)
                obj = MasterEvents(event_name=data['event_name'], event_desc=data['event_desc'],
                                    classroom_id=int(data['classroom_id']), link=data['link'], demo=data['demo'],
                                    password=data['password'], end_timestamp=data['end_timestamp'],
                                    external_link_check=data['external_link_check'], meetingId=meetingID)
            else:
                obj = MasterEvents(event_name=data['event_name'], event_desc=data['event_desc'],
                                   classroom_id=int(data['classroom_id']), link=data['link'], demo=data['demo'],
                                   password=data['password'], end_timestamp=data['end_timestamp'],
                                   external_link_check=data['external_link_check'])
            db.session.add(obj)
            db.session.flush()

            for child in data['events']:
                if child['start_timestamp'] < time.time() * 1000:
                    raise JsonApiException(detail="invalid", status=400)

                child_obj = ChildEvents(event_id=obj.id, start_timestamp=child['start_timestamp'],
                                        end_delta=child['end_delta'], delta=child['delta'])
                db.session.add(child_obj)

            db.session.commit()

            return jsonify("success"), 200

        else:
            return jsonify("invalid data"), 400

    else:
        return jsonify("should be a teacher"), 401
except Exception as e:
    print(e)

What I Tried:

  • Parameter Construction: I ensured that the parameters for both the meeting creation and the webhook registration were correctly constructed, including the checksum calculations.
  • URL Construction: I verified that the URLs were correctly formed and that the requests were properly sent to the BBB server.
  • Print Statements: Added print statements to check the URLs and parameters before making the requests.
  • Error Handling: Checked for any obvious mistakes in error handling or in the request logic.

Expected Outcome:
The expected outcome is that the webhook should be registered successfully, and the server should return a valid response indicating that the webhook has been created.

Actual Outcome:
I receive an IncompleteRead(0 bytes read) error when attempting to register the webhook.

Could anyone please help me in it.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật