Developing a 3rd party application

315 views
Skip to first unread message

Marko Vucetic

unread,
Oct 15, 2019, 5:30:11 AM10/15/19
to BigBlueButton-dev
So correct me if I'm wrong, but reading thru the docs I understood the next parts:

1. BBB needs it's own dedicated server to run
2. Front/Back 3rd party app should be hosted on another server

So after much trouble with my router to setup BBB, I decided simply to buy virtual server on digitalocean. 
I have installed BBB there with: wget -qO- https://ubuntu.bigbluebutton.org/bbb-install.sh | bash -s -- -v xenial-220-beta -s bbb.example.com -e in...@example.com

So I will be using BBB API only (no greenlight, as I will develop my own frontend).

So questions I got are these:
1. Do I really need to host my frontend on another server? So my website would be on example.com, and bbb will be on bbb.example.com? Or this isn't necessary, and I can somehow setup everything to be on example.com?
2. Since my BBB server is hosted on bbb.example.com, how can I make development environment from localhost? I can fetch the routes, but having trouble with /join, since it's returning html.
3. If I put redirect=false on /join, I get the url, but when I redirect to url, it says 401.
4. I figured out that I need JSESSSIONID cookie, but I have to get it from 'set-cookie' header (shouldn't this be returned as response field when redirect is false).
5. Since I'm on localhost, set-cookie doesn't work from localhost to bbb.example.com, so is there a way I can bypass this?

Main question: how can I develop from localhost when I need to set JSESSIONID on bbb.example.com?

P.S.: On /join, with  redirect=false, when password is incorrect, it returns html. 

Chad Pilkey

unread,
Oct 15, 2019, 11:58:45 AM10/15/19
to BigBlueButton-dev
The reason that we say to run BigBlueButton and your front-end on different servers is because it simplifies a lot of things. The chance for conflicts is less. Upgrades are much easier. Replacing the BBB server is easier. It is possible to run other applications on the BBB server, but you really really need to know about BBB and all its parts and you need to know a lot about what you're trying to run. If you choose to go down that path you're mostly on your own too because the issues you'll be dealing with are outside of BBB.

For proper usage of the API you want to be calling the create API first from the server-side and then redirect the page or open a new tab to the join API. I would not recommend using "redirect=false". If you're wanting to use user supplied passwords I would suggest not using them directly in the join URL. A better way to handle it is to validate the password in your front-end system and then, if the password was correct, use a different token on the join API to select the role for the user.

I think that if you open a new tab to the join API then the JSESSIONID should be set correctly. The only case where I've seen this not work is Safari in an iframe because it refuses to create a cookie.

Marko Vucetic

unread,
Oct 16, 2019, 3:57:49 AM10/16/19
to BigBlueButton-dev
OK, so can you explain me the workflow of 2 servers? One running BBB and other frontend/backend (I plan to make this in node js).

Is it possible to have those on one domain (so redirect=false isn't necessary) exp. example.com?

How would nginx configuration be for this? One server would have to redirect to another.

If they would be on different domains, example.com and bbb.example.com, how would I redirect to bbb.example.com?

Can you please elaborate more on this, or give me some workflow of server interacting which each other, redirect to one another etc...

Thanks :)

Marko Vucetic

unread,
Oct 16, 2019, 7:28:46 AM10/16/19
to BigBlueButton-dev
OK, so I figured out couple of things (redirected with nginx on BBB server to another where my frontend/backend is).

Now the next thing troubles me:

If user shares a link that he is currently on (/html5client/join?authToken=...), he will get 401 Unauthorized error. 

Can I somehow catch this, and redirect where I want to?

Also, I tried without redirect=false, and here is my problem:

1. User hits route /watch/:meetingID
2. On backend, I fetch the route /bigbluebutton/api
3. I get HTML as response
4. I try to render html, but scripts can't load from /watch... (I'm still on /watch/:meetingID)

Any solution for this?

Chad Pilkey

unread,
Oct 16, 2019, 12:53:27 PM10/16/19
to BigBlueButton-dev
I'm lost on what you're trying to do. I also have no idea what the "/watch" endpoint is that you're talking about. I'm not familiar with anything by that name in BigBlueButton.

You can have two different domains and everything works. It's how every single front-end system is working right now. An organization can have moodle.myorg.com and set up their BBB server on bbb.myorg.com. The front-end system is configured with the URL and shared secret for the BBB server so that it can generate API requests. The API documentation covers how to use it (http://docs.bigbluebutton.org/dev/api.html) and there's an API demo package (bbb-demo) that shows the basic usage of the API (source here, https://github.com/bigbluebutton/bigbluebutton/tree/master/bbb-api-demo).

The only way to change what happens if the enter API fails would be to edit the HTML5 client and handle it some other way. If you're trying to figure out a way to easily share a link to the meeting with other people, a common approach is to add a link to the welcome message that can be shared. You can see this in action on demo.bigbluebutton.org when you join a meeting. You could also add the link to the moderatorOnlyMessage if you want only the moderators to be able to see it.

Marko Vucetic

unread,
Oct 21, 2019, 8:34:54 AM10/21/19
to BigBlueButton-dev
Sorry about confusion, I intended to have my own route "/watch" and load html5client there, so I asked was this possible?
Also I was confused with /api/join endpoint, I thought checksum should be hidden from client, then I saw how greenlight works, that it calculates checksum on server, and then redirect frontend to there, which then redirects to html5client...

I have new questions now:

Let's say I setup 1 BBB server (bbb.example.com).

I want 3 different frontends, that will be located in mysite1.com, mysite2.com, mysite3.com.

So far, I know I can redirect from mysite1.com to bbb.example.com and everything works.

But is there a way to load BBB on mysite1.com, so users stays on this domain. I thought to redirect everything that starts with /html5client to BBB server in nginx, but I think this isn't enough?

Is it even possible? Like some nginx conf that proxy pass everything that BBB needs to BBB server, while still being on mysite1.com, and not opening new tab or redirect to bbb.example.com?

Fred Dixon

unread,
Oct 21, 2019, 8:40:54 AM10/21/19
to BigBlueButton-dev
Hi Marko,


> But is there a way to load BBB on mysite1.com, so users stays on this domain. I thought to redirect everything that starts with /html5client to BBB server in nginx, but I think this isn't enough?

If you point mysite1.com, mysite2.com, mysite3.com to the same BigBlueButton server, and if the front end creates a unique meeting Id for each room (and Greenlight does), then whether you have three users on mysite1 using your BigBlueButton server, or one user on each of mysite1, mysite2, and mysite3 using your BigBlueButton server -- to the server they are three distinct meetings and it should work.

Regards,... Fred

--
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/52c14e13-5d25-40bf-8ba9-97cad2cc5f52%40googlegroups.com.


--
BigBlueButton Developer
@bigbluebutton

Marko Vucetic

unread,
Oct 21, 2019, 9:08:03 AM10/21/19
to BigBlueButton-dev
Hmm, not quite what an answer I was looking for.

I want to have 3 frontends, on 3 different IPs and domains. Each frontend will make API calls to same BBB server (I can guarantee unique ids).
Instead of redirecting all 3 to bbb.example.com, I want to stay on the same domain, mysite1.com, and load html5client there.

So user that registers on mysite1.com, and make a room, I want to redirect him to mysite1.com/html5client .... And not bbb.example.com...

If this is unclear, here is step by step what I can do, and what I want to accomplish:

What I know how to do and will work:
1. User registers on mysite1.com (my front/back)
2. User makes room (my front/back)
3. I call from my frontend bbb.example.com/bigbluebutton/api/create

What I want to accomplish:
1. User registers on mysite1.com (my front/back)
2. User makes room (my front/back)
3. I call from my frontend bbb.example.com/bigbluebutton/api/create
4. I redirect user to mysite1.com/bigbluebutton/api/join (notice that server where mysite1.com is pointing doesn't have BBB installed)

That's why I think I need some nginx conf for mysite1.com, that will redirect all traffic going to location =/bigbluebutton or location =/html5client to BBB server

Is this possible?

Chad Pilkey

unread,
Oct 21, 2019, 12:50:52 PM10/21/19
to BigBlueButton-dev
The API, and BigBlueButton itself, isn't designed for what you're looking for. When the user's browser hits the /bigbluebutton/join URL, the server processes the request and forwards the user to the domain and client endpoint that's configured in the server's bigbluebutton.properties file. All of the join URLs will get turned into the same client endpoint.

The easiest way to mostly hide the client URL is to load the join URL in an iframe. The BBB server's domain will still be exposed in the permission dialog, but other than that it will only be exposed in the source for the page itself. The one part that doesn't really work with an iframe is cookies in Safari. If you call the join URL in the user's browser with redirect=false and then load the iframe it should work.
Reply all
Reply to author
Forward
0 new messages