Retrieving MeetingID from API

426 views
Skip to first unread message

Jacques Gingras

unread,
May 21, 2020, 2:08:50 PM5/21/20
to BigBlueButton-dev
I'm trying to check from a 3rd party app to see if a meeting is running. Except, I only know the roomID. Is there a way to retrieve the current active meeting ID if there is one, or is there a way to make a modification to the isMeetingRunning api to be able to pass in the RoomID instead?

Here is the full scenario. We have an online store that customers will be visiting. I want to put a link to join the meeting associated with that store location if it's started. I will have the room ID as that will be a constant for that location, however each day a new meetingID will be created, so I don't want to have to change my settings everyday. What would you recommend to accomplish this?

DIY MEN

unread,
May 21, 2020, 4:44:28 PM5/21/20
to BigBlueButton-dev
I can help you with that.
Basically all the info can be found using the API.

I am currently making some tools for the bigbluebutton. https://github.com/Perilous-Programmer/BigBlueButton-Tools

DIY MEN

unread,
May 21, 2020, 4:45:53 PM5/21/20
to BigBlueButton-dev
What are the details of 3rd party app that you are using.

Jacques Gingras

unread,
May 21, 2020, 4:51:23 PM5/21/20
to BigBlueButton-dev
It's our own app that we built. I understand being able to retrieve all current meetings, but the meeting name may be the same.. for example, Home Room for multiple users on the app. If there are multiple users, is there a way to retrieve the meetings for a particular user?

Jacques Gingras

unread,
May 21, 2020, 4:51:55 PM5/21/20
to BigBlueButton-dev
It's a Ruby on Rails app with a JS front end. I have it working to call the isMeetingRunning API, but I'm not passing it the correct meeting ID.

DIY MEN

unread,
May 21, 2020, 5:25:57 PM5/21/20
to BigBlueButton-dev
 to find the correct meetingID based on a speific user. you need to explicitly describe the userID in your join api call.

Jacques Gingras

unread,
May 21, 2020, 5:28:24 PM5/21/20
to BigBlueButton-dev
But I am starting the original meeting from Greenlight. So our app has no knowledge of the meeting, or any tokens associated with it.

DIY MEN

unread,
May 21, 2020, 5:37:06 PM5/21/20
to BigBlueButton-dev
then you have 2 ways to move forward.

1. Get the info from Green Light Database. (integration of your app and GL)
2. you need to guess on the name of the person in the meeting details.

But My preference is to have central control for all the things. meaning ditch the GL and use your app for every thing.


DIY MEN

unread,
May 21, 2020, 5:58:18 PM5/21/20
to BigBlueButton-dev
because on the base of name there will always be doubt, because many users can have same name in the BBB server.

German Acevedo

unread,
May 21, 2020, 6:22:06 PM5/21/20
to BigBlueButton-dev
Hi DIY,
I have seen your GitHub project but I only found a stats.html file, but can't see how it connects to the BigBlueButton API.
Can you share how to use it? Does it have to be in the bigbluebutton default folder?
Tanks in advance for your help,
Regards,
German Acevedo

DIY MEN

unread,
May 21, 2020, 6:57:38 PM5/21/20
to BigBlueButton-dev
I have just started to add my files in the repo. alot needs to be added. The instructions are as follows.

1. Copy the file to the "/var/www/bigbluebutton-default" folder in you BigBlueButton server.
2. Edit the stats.html file.
3. Find and replace the "BBBAPICALL" with the proper getMeetings API call. (Example:: http://test-install.blindsidenetworks.com/bigbluebutton/api/getMeetings?checksum=d23fef405937517be465ffccae12d5c1103a5e00)

for your api call you can use the https://mconf.github.io/api-mate/

Reimar Bauer

unread,
May 21, 2020, 6:57:56 PM5/21/20
to bigblueb...@googlegroups.com

Jacques Gingras <jacques...@gmail.com> schrieb am Do., 21. Mai 2020, 20:08:
I'm trying to check from a 3rd party app to see if a meeting is running. Except, I only know the roomID. Is there a way to retrieve the current active meeting ID if there is one, or is there a way to make a modification to the isMeetingRunning api to be able to pass in the RoomID instead?

Here is the full scenario. We have an online store that customers will be visiting. I want to put a link to join the meeting associated with that store location if it's started. I will have the room ID as that will be a constant for that location, however each day a new meetingID will be created, so I don't want to have to change my settings everyday. What would you recommend to accomplish this?

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bigbluebutton-dev/c47df1a9-b841-434d-bcd6-86d0252fcbd6%40googlegroups.com.

German Acevedo

unread,
May 21, 2020, 8:15:09 PM5/21/20
to BigBlueButton-dev
This is a Great Tool!
Thanks for sharing, it works like a charm.
Is it possible to add the <bbb-origin> and <bbb-context> to the meeting info? Some of our meetings are created through Greenlight and some through Moodle, and this would help us to identify the courses that are active.
Regards,
German Acevedo

Jacques Gingras

unread,
May 22, 2020, 8:03:24 AM5/22/20
to BigBlueButton-dev
Perfect! Thank you very much. This is what I needed. bbb_id in the GL rooms table.

DIY MEN

unread,
May 22, 2020, 3:44:02 PM5/22/20
to BigBlueButton-dev
Yes this is my very next task.  I will add it by tomorrow.

German Acevedo

unread,
May 22, 2020, 6:47:18 PM5/22/20
to BigBlueButton-dev
If it helps, my son helped me and looking at your code he added a few lines and now its working in our server.
This is how our stats.html file is now:
 =========================================================

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <title>Connect Stats</title>
  </head>
  <body>
      
      <div id="app" class="container">
            <!-- Over All Server Stats -->
            <div class="row "> 
                <div class="col-4 card">
                        <h2 class="card-title">Total de Salas </h2>
                        <p class="card-text" id="tMeetings">{{ Meetings }}</p>
                </div>
                <div class="col-4 card">
                        <h2 class="card-title">Total de Cámaras </h2>
                        <p class="card-text" id="tMeetings">{{ Webcams }}</p>
                </div>
                <div class="col-4 card">
                    <h2  class="card-title">Total de Participantes</h2>
                    <p  class="card-text" id="tParticipants">{{ Participants }}</p>
                </div>
            </div>
            <!-- Meetings -->
            <div class="row border border-secondary mt-md-5" v-for="Meeting in MeetingData" >  
                <!-- Meeting Stats -->
                <div class="col border-bottom border-secondary">
                    <div class="row">
                        <div class="col card">
                            <span class="card-text">Nombre de la sala : {{Meeting["meetingName"]}}</span>
                            <span class="card-text">ID de la sala : {{Meeting["meetingID"]}}</span>
                        <span class="card-text">Origen : {{Meeting["bbbOrigin"]}}</span>
                        <span class="card-text">Curso : {{Meeting["bbbContext"]}}</span>
                        <span class="card-text">Hora de inicio : {{Meeting["createDate"]}}</span>
                        </div>
                        <div class="col card">
                            <p>Participantes : {{Meeting["attendeescount"]}}</p> 
                        </div>
                        <div class="col card">
                            <p>Cámaras activas : {{Meeting["cams"]}}</p> 
                        </div>
                    </div>
                </div> 
                <!-- Meeting Attendees -->
                <div class="col-12" >
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <td>ID Usuario</td>
                            <td>Nombre</td>
                            <td>Rol</td>
                            <td>Presentador</td>
                            <td>Solo escuchar</td>
                            <td>Micrófono</td>
                            <td>Web Cam</td>
                            <td>Tipo de cliente</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for='person in Meeting["attendee"]'>
                            <td>{{person[0]}}</td>
                            <td>{{person[1]}}</td>
                            <td>{{person[2]}}</td>
                            <td>{{person[3]}}</td>
                            <td>{{person[4]}}</td>
                            <td>{{person[5]}}</td>
                            <td>{{person[6]}}</td>
                            <td>{{person[7]}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
                              
      </div>
    
    <script>
        var xl ;
        var MA;
        var table ;
        var app = new Vue({
            el: '#app',
            data: {
                DataXML: "xmldata" ,
                Meetings: 0,
                Participants: 0,
                Webcams: 0,
                MeetingData: Array()
            },
            methods: {
                getdata(data="newdata") {
                    //alert("Getting data");
                    app.DataXML = data;
                    axios.get('APIBBBCALL').then(response => {
                        app.DataXML = new DOMParser().parseFromString(response.data,"text/xml");
                        xl = meetings = app.DataXML.getElementsByTagName("meeting");
                        tattendee = app.DataXML.getElementsByTagName("attendee")
                        webCams = MA = app.DataXML.getElementsByTagName("hasVideo");
                        app.Webcams = 0;
                        for (i=0;i < webCams.length;i++ ){
                            if (webCams[i].innerHTML == "true"){
                                app.Webcams++;
                            }
                        }
                        app.Meetings = meetings.length;
                        app.Participants = tattendee.length;
                        //app.DataXML = response.data;
                        table = Array();
                        name = "";
                        for (i=0;i<meetings.length;i++){
                            var Mattendee = meetings.item(i).getElementsByTagName("attendee");
                            var Mattendeedata = Array();
                            var cams = 0;
                            for (x=0; x < Mattendee.length;x++){
                               Mattendeedata.push([
                                   Mattendee[x].children[0].innerHTML,
                                   Mattendee[x].children[1].innerHTML,
                                   Mattendee[x].children[2].innerHTML,
                                   Mattendee[x].children[3].innerHTML,
                                   Mattendee[x].children[4].innerHTML,
                                   Mattendee[x].children[5].innerHTML,
                                   Mattendee[x].children[6].innerHTML,
                                   Mattendee[x].children[7].innerHTML
                                ]);
                                if (Mattendee[x].children[6].innerHTML == "true"){
                                    cams++;
                                }
                                   
                            }
                        try{
                            var context = meetings.item(i).getElementsByTagName("bbb-context").item(0).textContent
                                var origin = meetings.item(i).getElementsByTagName("bbb-origin").item(0).textContent
                            }
                        catch(err){
                            var context = "--"
                                var origin = "GreenLight"
                            }
                            var row = { 
                                meetingName : meetings.item(i).getElementsByTagName("meetingName").item(0).textContent, 
                                meetingID : meetings.item(i).getElementsByTagName("meetingID").item(0).textContent,
                            bbbOrigin : origin,
                            bbbContext : context,
                            createDate : meetings.item(i).getElementsByTagName("createDate").item(0).textContent,
                                attendeescount : Mattendee.length,
                                attendee: Mattendeedata,
                                cams: cams
                            };
                            
                            table.push(row);
                        }
                        app.MeetingData = table;
                    });
                }
            }
        });
        
        document.addEventListener('DOMContentLoaded', function() {
              //alert("ready");
              app.getdata("function data");
              window.setInterval(function(){app.getdata("function data");}, 20000);
        });
    </script>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popp...@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
  </body>
</html>

==========================================================================

Regards,

German

PD: Some tags are translated to spanish

DIY MEN

unread,
May 23, 2020, 4:23:22 PM5/23/20
to BigBlueButton-dev
Thank you very much for the help.
I was updating my code. I have updated the UI. I will use your update in it.

thanks again

On Thursday, May 21, 2020 at 11:08:50 PM UTC+5, Jacques Gingras wrote:

DIY MEN

unread,
May 23, 2020, 4:55:26 PM5/23/20
to BigBlueButton-dev
Please Visit the repository again. for updated UI.
Thank you again.

German Acevedo

unread,
May 24, 2020, 12:27:29 AM5/24/20
to BigBlueButton-dev
This is great! Looks very nice also!

Martin Thomas Schrott

unread,
May 24, 2020, 4:01:17 AM5/24/20
to bigblueb...@googlegroups.com, DIY MEN

Am 21.05.2020 um 22:44 schrieb DIY MEN:
> I can help you with that.
> Basically all the info can be found using the API.
>
> I am currently making some tools for the bigbluebutton.
> https://github.com/Perilous-Programmer/BigBlueButton-Tools
>

hi, tanks for sharing your work. What other tools are you working on?


cheers

Martin


N M

unread,
May 24, 2020, 2:42:48 PM5/24/20
to BigBlueButton-dev
Hi All,


Sorry to interrupt. I came across this post and find out that this tool is very useful. 
Thanks for sharing.


BR, 
Nazri
Retrieving MeetingID from API.PNG
Reply all
Reply to author
Forward
0 new messages