How to integrate bigbluebutton in Laravel -8 – with example

bigbluebutton integration

In this article we will learn about, how we can integrate bigbluebutton in Laravel 8 without using any package.

If you want to integrate by using bigbluebutton package please refer to this link.

The very important thing which is needed in order to integrate bigbluebutton to the laravel is bigbluebutton security salt you can get all this things following this link.

Or you can also use below test security salt to test your application in the localhost.

http://test-install.blindsidenetworks.com/bigbluebutton/api

8cd8ef52e8e101574e400365b55e11a6

Use the above code in your .env file in this way

BBB_SECURITY_SALT=8cd8ef52e8e101574e400365b55e11a6
BBB_SERVER_BASE_URL=http://test-install.blindsidenetworks.com/bigbluebutton/api

Now we will use create API to create the meeting, use the below code to create a meeting. In the below code I have $params, so you can create $params like the below one.

$params = [
    'meetingID' => 'random-3787658',
    'name' => 'random-3787658',
    'attendeePW' => 'ap',
    'moderatorPW' => 'mp',
];
$queryBuild = http_build_query($params);
            $checkSum = sha1('create'.$queryBuild . env('BBB_SECURITY_SALT'));
            $url = env('BBB_SERVER_BASE_URL') . 'api/'.create.'?' . $queryBuild . '&checksum=' . $checkSum;
            
                $options = array( 
                    CURLOPT_RETURNTRANSFER => true,   // return web page
                    CURLOPT_HEADER         => false,  // don't return headers
                    CURLOPT_FOLLOWLOCATION => false,   // follow redirects
                    CURLOPT_MAXREDIRS      => 10,     // stop after 10 redirects
                    CURLOPT_ENCODING       => "",     // handle compressed
                    CURLOPT_USERAGENT      => "test", // name of client
                    CURLOPT_AUTOREFERER    => true,   // set referrer on redirect
                    CURLOPT_CONNECTTIMEOUT => 1200,    // time-out on connect
                    CURLOPT_TIMEOUT        => 1200,    // time-out on response
                ); 
            
                $ch = curl_init($url);
                curl_setopt_array($ch, $options);
                $content  = curl_exec($ch);
                $xml = simplexml_load_string($content, "SimpleXMLElement", LIBXML_NOCDATA);
                

If dd the above code you will response something like below one.

bigbluebutton response

Now we will write the code to start the meeting as a moderator.

For moderator we will use following parameters.

$params = [
                'meetingID' => 'random-3787658',
                'password' => 'mp', //moderator password set here 
                'redirect' => 'true',
            ];

Now we write code to get start meeting url, use the below code to get the url.

$queryBuild = http_build_query($params);
            $checkSum = sha1('join' .$queryBuild . env('BBB_SECURITY_SALT'));
            $url = env('BBB_SERVER_BASE_URL') . 'api/'.'join'.'?' . $queryBuild . '&checksum=' . $checkSum;

When you echo the URL you will get the output something like below

http://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+8899288&meetingID=random-3787658&password=mp&redirect=true&checksum=8c360dcb2d99f7282164dbb5f1582ca0126fb41c

Click on the URL to start the meeting, once meeting has been started you have something like the below image.

bigbluebutton start screen

Now we will write code for the attende to join the meeting.

For the attendee we have to pass the following parameter.

$params = [
                'meetingID' => 'random-3787658',
                'password' => 'ap', //moderator password set here 
                'redirect' => 'true',
            ];

Now we will write the code to get the join URL to join as attendee

 $queryBuild = http_build_query($params);
            $checkSum = sha1('join' .$queryBuild . env('BBB_SECURITY_SALT'));
            $url = env('BBB_SERVER_BASE_URL') . 'api/'join'?' . $queryBuild . '&checksum=' . $checkSum;

you will get the URL like something below

http://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+899276&meetingID=random-2846754&password=ap&redirect=true&checksum=8daa7115264e76c5abe630d0b2e24775efc1f502

When click on that URL you will be joined as a attendee you will have something like the below image.

bigbluetton attendee join page

Read Also: Bigbluebutton integration by using package

I hope you like the above article, I try to show you how we can integrate bigbluebutton in the simplest way.

5 1 vote
Article Rating

Do you want to hire us for your Project Work? Then Contact US.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x