I have created an ms team meet link with lobby by pass settings, so when i join the meeting it redirects to https://teams.live.com//conversations/?ctx=chat this page wt anout the meeting?? why it is nt joing to meet?
Krithika salian
0
Reputation points
public function generateMeetingLink($accessToken) {
$url = 'https://graph.microsoft.com/v1.0/users/e6788f5f-b4777-4656-afb1-4cf6e7b78f29/onlineMeetings';
// Prepare headers
$headers = [
'Authorization: Bearer ' . $accessToken,
'Content-Type: application/json'
];
// Prepare data for creating a meeting
$data = [
'startDateTime' => date('c', strtotime('now')), // Start time of the meeting
'endDateTime' => date('c', strtotime('+1 hour')), // End time of the meeting (1 hour from now)
'subject' => 'Interview Meeting', // Subject of the meeting
'allowAttendeeToEnableCamera' => true,
'allowAttendeeToEnableMic' => true,
'allowAnonymousUsersToJoin' => true, // Ensure anonymous users can join
'lobbyBypassSettings' => [
'scope' => 'everyone', // Allow everyone to bypass the lobby
'isDialInBypassEnabled' => true // Allow dial-in users to bypass the lobby
],
'allowAnonymousUsersToStartMeeting' => true,
'isEntryExitAnnouncementEnabled' => false, // Disable entry/exit announcements
'allowedPresenters' => 'everyone', // Allow everyone to present
'autoAdmittedUsers' => 'everyone' // Allow everyone to present
];
// Convert data to JSON format
$postData = json_encode($data);
// Initialize cURL session
$curl = curl_init($url);
// Set cURL options
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Execute cURL request
$response = curl_exec($curl);
// Close cURL session
curl_close($curl);
// Check if response contains meeting URL
$responseData = json_decode($response, true);
if (isset($responseData['joinUrl'])) {
// Meeting link generated successfully
$meetingLink = $responseData['joinUrl'];
// You can store this meeting link or use it as needed
return $meetingLink;
} else {
// Meeting link generation failed
// Handle error
return null;
}
}
Sign in to answer