PHP code example of invokablegmbh / bbbserver-systemapi

1. Go to this page and download the library: Download invokablegmbh/bbbserver-systemapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

invokablegmbh / bbbserver-systemapi example snippets


use BbbServer\SystemApiConnector\SystemApiConnector;

// Simplest — uses default base URL https://app.bbbserver.de/bbb-system-api
$connector = SystemApiConnector::forBbbserver('YOUR_API_KEY');

// With explicit language prefix (affects server-generated texts like emails):
$connector = SystemApiConnector::forBbbserver('YOUR_API_KEY', 'en');

// With a fully custom base URL:
$connector = new SystemApiConnector('https://custom.example.com/bbb-system-api', 'YOUR_API_KEY');

$rooms = $connector->conferenceRooms()->listConferenceRooms();

$room = $connector->conferenceRooms()->getConferenceRoom('ROOM_ID');

$connector->conferenceRooms()->createConferenceRoom(['name' => 'Team Room']);

$connector->conferenceRooms()->updateConferenceRoomSettings([
    'roomId' => 'ROOM_ID',
    'name'   => 'Renamed Room',
]);

$connector->conferenceRooms()->personalJoins([
    'roomId' => 'ROOM_ID',
    'names'  => json_encode(['Alice', 'Bob']),
    'type'   => 0, // 0 = guest, 1 = moderator
]);

$connector->conferenceRooms()->deleteConferenceRoom('ROOM_ID');

$conferences = $connector->conferences()->listConferences(['roomId' => 'ROOM_ID']);

$conference = $connector->conferences()->getConference('CONFERENCE_ID');

$connector->conferences()->findConference('JOIN_LINK_OR_QUERY');

$connector->conferences()->createConference([
    'roomId'                    => 'ROOM_ID',
    'name'                      => 'Customer Webinar',
    'maxConnections'            => 50,
    'startTime'                 => '2026-04-01 10:00:00',
    'duration'                  => 60,
    'askModeratorForGuestJoin'  => 'true',
    'advancedSettings'          => json_encode(['webcamsOnlyForModerator' => false]),
    'userAttendenceDocumentation' => 0,
]);

$connector->conferences()->updateConference([
    'conferenceId' => 'CONFERENCE_ID',
    'name'         => 'Updated Webinar',
]);

$connector->conferences()->personalJoins([
    'conferenceId' => 'CONFERENCE_ID',
    'names'        => json_encode(['Alice', 'Bob']),
    'type'         => 0,
]);

$connector->conferences()->deleteConference('CONFERENCE_ID');

$connector->conferences()->uploadSlides('CONFERENCE_ID', new CURLFile('/path/to/slides.pdf'));

$connector->conferences()->downloadSlides('CONFERENCE_ID');

$connector->conferences()->removeSlides('CONFERENCE_ID');

$connector->moderators()->listModerators();

$connector->moderators()->registerUser([
    'email' => '[email protected]',
    'name'  => 'Jane Doe',
]);

$connector->moderators()->toggleUserCanLogin('[email protected]');
$connector->moderators()->toggleUserIsAdmin('[email protected]');
$connector->moderators()->refreshInvitationLink(['email' => '[email protected]']);
$connector->moderators()->removeUser('[email protected]');

$connector->moderatorGroups()->listModeratorGroups();
$connector->moderatorGroups()->getModeratorGroup('GROUP_ID');
$connector->moderatorGroups()->createModeratorGroup(['name' => 'Sales Team']);

$connector->moderatorGroups()->addToModeratorGroup([
    'moderatorGroupId' => 'GROUP_ID',
    'moderators'       => json_encode(['[email protected]']),
]);

$connector->moderatorGroups()->toggleUserIsGroupAdmin('GROUP_ID', '[email protected]');
$connector->moderatorGroups()->unassignUser('GROUP_ID', '[email protected]');
$connector->moderatorGroups()->refreshInvitationLink('GROUP_ID', 'moderator');
$connector->moderatorGroups()->deleteModeratorGroup('GROUP_ID');

$connector->customerSettings()->conferenceList();
$connector->customerSettings()->plugins();
$connector->customerSettings()->setPluginPolicies(['policies' => json_encode(['key' => 'value'])]);

// Integration API
$connector->customerSettings()->integrationApi();
$connector->customerSettings()->toggleIntegrationApi();

// Conference recording
$connector->customerSettings()->conferenceRecording();
$connector->customerSettings()->toggleConferenceRecording();

// Branding — color
$connector->customerSettings()->getBrandingColor();
$connector->customerSettings()->setBrandingColor('#1a73e8');
$connector->customerSettings()->removeBrandingColor();

// Branding — logo (PNG, 580x400)
$logoContent = $connector->customerSettings()->getBrandingLogo();   // returns raw binary string
$connector->customerSettings()->setBrandingLogo(new CURLFile('/path/to/logo.png'));
$connector->customerSettings()->removeBrandingLogo();

// Branding — presentation (PDF)
$pdfContent = $connector->customerSettings()->getBrandingPresentation(); // returns raw binary string
$connector->customerSettings()->setBrandingPresentation(new CURLFile('/path/to/slides.pdf'));
$connector->customerSettings()->removeBrandingPresentation();

$connector->recordings()->listRecordings(['roomId' => 'ROOM_ID']);
$connector->recordings()->listByConference('CONFERENCE_ID');
$connector->recordings()->getRecording('RECORDING_ID');
$connector->recordings()->prepareDownload('RECORDING_ID');
$connector->recordings()->deleteRecording('RECORDING_ID');

$connector->invoices()->listInvoices();

$connector->userAttendance()->listUserAttendance(['roomId' => 'ROOM_ID']);
$connector->userAttendance()->getUserAttendance('CONFERENCE_ID');
$connector->userAttendance()->deleteUserAttendance('CONFERENCE_ID');

$connector->partner()->clients();
$connector->partner()->turnovers(2026, 3);
$connector->partner()->creditInvoices();

$connector->others()->root();
$connector->others()->ipranges();

// Global
$connector->request('GET', '/some/new-endpoint', ['key' => 'value']);

// Scoped to a resource prefix
$connector->conferences()->request('GET', '/future-endpoint', ['key' => 'value']);

use BbbServer\SystemApiConnector\Exception\AuthenticationException;
use BbbServer\SystemApiConnector\Exception\SystemApiException;

try {
    $connector->conferenceRooms()->listConferenceRooms();
} catch (AuthenticationException $e) {
    // Invalid or missing API key (HTTP 401/403)
    echo $e->statusCode();       // 401
    echo $e->responsePayload();  // decoded JSON error body
} catch (SystemApiException $e) {
    // Any other API error (4xx/5xx)
    echo $e->getMessage();
}