Unauthorized: 401. Session not found, when trying to join via API

3,324 views
Skip to first unread message

Shahzad Hassan

unread,
Feb 10, 2020, 3:58:23 AM2/10/20
to BigBlueButton-dev
Hi,
We have recently started working with BBB. We are trying to integrate BBB into our nodejs app.
We are able to do the following 2 steps successfully on API but failing on 3rd step
1 - create a meeting
2- join a meeting and get a successful XML response 


<response>

<returncode>SUCCESS</returncode>

<messageKey>successfullyJoined</messageKey>

<message>You have joined successfully.</message>

<meeting_id>524077515fcfc3c2974c99f7ffefbca3649b9bb6-1581324727543</meeting_id>

<user_id>w_iyguoxf7vlqf</user_id>

<auth_token>aq9nzatnidz0</auth_token>

<session_token>tbmi71sarqykby4g</session_token>

<guestStatus>ALLOW</guestStatus>

<url>https://bbb.schoolx.pk/html5client/join?sessionToken=tbmi71sarqykby4g</url>

</response>


3) When we try to join on the URL in the response we are getting unauthorized 401 (session not found error). We are trying to open the conference into an IFRAME and hiding the URL from end-users.

by the way, it's not clear how to use auth_token here


Please advise if we are doing something wrong.



Screen Shot 2020-02-10 at 1.56.22 PM.png

Pranav Kuldharan

unread,
Feb 10, 2020, 5:18:55 AM2/10/20
to bigblueb...@googlegroups.com
Hi Shahzad,

 I am also facing the same issue. I also try to find the solution for this. If you have to solve this problem temporarily then you have to refresh the page and try again to join.
This is not the correct solution but I didn't get any answer to my question yet. 


I shared the link of my question. Please go through these and if you get any solution please let me know.

Thanks and Regards
Pranav

--
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/187a0d15-7879-4c02-a36e-94376d0b98b4%40googlegroups.com.


--
Pranav Kuldharan
Mobile Number: 9657235731
Email address: pra...@coffeebeanstechnologies.com
Software Engineer,
CoffeeBeans Technologies

Chad Pilkey

unread,
Feb 10, 2020, 1:04:57 PM2/10/20
to BigBlueButton-dev
The join URL should be called from the user's browser. If you call the join URL from the server-side the client won't be able to retrieve the enter API and you'll get a 401.

Ashish Srivastava

unread,
Apr 12, 2020, 1:38:28 AM4/12/20
to BigBlueButton-dev
Hi Shahzad,

I am also facing same issues when I create and join the meeting by APIs. I tried reinstalling it but it is not working. However, when I create meeting with Greenlight client, it works perfectly. I was just wondering if you found any fix for that?

Thanks.

Shahzad Sherazi

unread,
Apr 12, 2020, 1:53:39 AM4/12/20
to bigblueb...@googlegroups.com
Hi Ashish,

As far as I remember it was some combination of API parameters that were causing this issue. 
With the right combination, it started to work.
Sometimes though we get this error when using Safari. We think it because of slow internet connection. 
If you keep on getting this error, send me your API request and I can match it with mines to see if there are any differences.

Regards,


--
You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/TkjyUZP_gO8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bigbluebutton-dev/83dba44d-ed98-48df-800c-4bfbba1a6e78%40googlegroups.com.


--
Regards,
Syed Sherazi

Ashish Srivastava

unread,
Apr 12, 2020, 2:34:25 AM4/12/20
to BigBlueButton-dev
Hi Shahjad, 

I got it working. For future reference, I am just pasting code with sample API payload here which is written in Laravel. Hope it will be helpful:

<?php
namespace App\Lib;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Facades\Http;


class BBBHelper extends Facade
{
/* Example of generating joining Url
$url = BBBHelper::getJoinMeetingUrl([
'fullName' => 'User+653034',
'meetingID' => 'MeSc1EqvKZ',
'password' => 'ar5E',
'redirect' => 'true',
]);
*/

public static function getJoinMeetingUrl($parameters, $debug = false)
{
$paraString = http_build_query($parameters);
if ($debug) print "\n\nParastring: {$paraString}\n";
$checksum = sha1("join".$paraString.env('BBB_SALT'));
return env('BBB_API_URL') . "/join"."?{$paraString}&checksum={$checksum}";
}

/*Example of Creating Meeting

BBBHelper::runAPI('create', [
'name' => 'Ashish-11234',
'meetingID' => 'MeSc1EqvKZ',
'moderatorPW' => 'ar5E',
'attendeePW' => '1234',
'duration' => 60,
'maxParticipants' => 5,
'logoutURL' => 'env("BBB_RETURN_URL")',
'record' => 'false',
'redirect' => 'true',
'allowStartStopRecording' => 'true'
], false);

*/

public static function runAPI($name, $parameters, $debug = true)
{
$paraString = http_build_query($parameters);
if ($debug) print "\n\nParastring: {$paraString}\n";
$checksum = sha1($name.$paraString.env('BBB_SALT'));
if ($debug) print "Checksum: {$checksum}\n";
$url = env('BBB_API_URL') . "/{$name}" ;
$parameters['checksum'] = $checksum;
$response = Http::withOptions(['debug' => $debug])
->get($url, $parameters);

return $response->body();
}

}


To unsubscribe from this group and all its topics, send an email to bigblueb...@googlegroups.com.


--
Regards,
Syed Sherazi

Jignesh Joisar

unread,
Apr 19, 2020, 5:30:03 AM4/19/20
to BigBlueButton-dev
i m creating bigbluebutton package for laravel developer so easily can integrate bigbluebutton server into laravel framework..
Please check my package https://github.com/joisarjignesh/bigbluebutton 
if found any issue pl post issue on my package 

On Monday, February 10, 2020 at 2:28:23 PM UTC+5:30, Shahzad Hassan wrote:

Gopal Krish Venkat

unread,
Jul 11, 2020, 2:31:08 AM7/11/20
to BigBlueButton-dev
@Shahzad: Guys am just using a core php withour any framework... just using CURL and am also getting same issue... if i use redirect=false am getting the XML, but if i use that URL its getting 401 error.. how to overcome this ? if i directly put the join api in browser, from that xml session token is working.... Please help me !


On Monday, February 10, 2020 at 2:28:23 PM UTC+5:30, Shahzad Hassan wrote:

Francis D Souza

unread,
Aug 6, 2020, 4:58:45 AM8/6/20
to BigBlueButton-dev
Reply all
Reply to author
Forward
0 new messages