“Add BigBlueButton” to already existing conference
This plugin creates automatically a room for you when you click “Add BigBlueButton”. But you may want to use an already existing room instead (created before you had this plugin). Here are two examples of why you might want that.
-
You have already created a room - (with greenlight, for example) and want to allow people to also join from discourse
-
Also allow people to join via link - When using greenlight (the default front-end) it generates a shareable link to join the call. With this people can join via discourse or via link.
This is quite an invasive process so make really sure you understand what you are doing
Instructions
Most likely the front-end you’re using (greenlight?) doesn’t give you low-level information like the meeting ID or attendeePW
(which is different than the room’s access code - I know, It’s confusing). So in order to obtain those we’ll have to use the API for BBB to list all the meeting’s information.
Note: there may be a better way to do this, but I am not aware. Just let me know if that’s the case.
Prerequisites
- access to terminal BBB server (via ssh, for example)
- basic python knowledge (to verify my code)
- understanding of security risks of using the BBB API
1. Obtain BBB secret and API endpoint
Access a shell (via ssh) where the BBB server is running and run
sudo bbb-conf --secret
That will give you a URL
and a Secret
. They will be useful later.
Anyone with that secret can do nasty stuff your server! So keep it safe.
2. Create python3 script to obtain the Meeting’s information
Bellow is a simple python 3 script that takes your URL and Secret (given in step 1.) and generates the API to get the information from the meetings:
Don’t just paste random scripts you find on the internet (this one included!). Check it and see if makes sense and if needed check the documentation for the API.
import hashlib
from urllib.parse import urljoin
# Insert your variables here
base_url = "PASTE_HERE_YOUR_URL" + "api/"
secret = "PASTE_HERE_YOUR_SECRET"
# generate the security checksum
plaintext = "getMeetings" + secret
sha1 = hashlib.sha1()
sha1.update(plaintext.encode('utf-8'))
checksum = sha1.hexdigest()
# obtain the API url for listing meetings' information
url = urljoin(base_url, "getMeetings?checksum=" + checksum)
print("open the following URL to see the meeting's information")
print(url)
replace PASTE_HERE_YOUR_URL
with the API URL obtained earlier and PASTE_HERE_YOUR_SECRET
with the secret and then run the script.
After this it should print a url like https://example.com/bigbluebutton/api/getMeetings?checksum=20e928e8928e8e9f919928e829d999df82882818
Anyone with that URL can do nasty stuff!
They can see all the meetings that are going on, how may users are in each as well as obtaining the credentials to join it.
3. Open the URL
Open it in private browsing mode to make sure the URL isn’t stored in the browser history due to the above warning.
Just start the meeting you pretend to add and refresh that page with the API URL. Then you should see something like
<response>
<returncode>SUCCESS</returncode>
<meetings>
<meeting>
<meetingName>Your room name</meetingName>
<meetingID>XXXXXXXXXXXXXXXXXXXXXXXXXXX</meetingID>
...
<attendeePW>YYYYYYY</attendeePW>
<moderatorPW>ZZZZZZZ</moderatorPW>
...
Just look for the lines bellow the meeting you want and take:
- meetingID
- attendeePW
- moderatorPW
After you obtain these, erase all the files and close all the tabs with access to the API.
We don’t want any security incidents!
4. “add BigBlueButton” to your post
Instead of adding via the regular “add BigBlueButton” interface, just paste the following onto your post:
[wrap=discourse-bbb meetingID="XXXXX" attendeePW="YYYYY" moderatorPW="ZZZZZ" mobileIframe="false" desktopIframe="false"][/wrap]
And replace with what you obtained in step 3.
- XXXXX with the content of
meetingID
- YYYYY with the content of
atendeePW
- ZZZZZZ with the content of
moderatorPW
And then save the post.
6. It should be working now \o/
You should now be able to join both via discourse and via the other front-end you were using. If it was greenlight, you can also join via link now too.