# Api integration

**URL:** <https://devforum.zoom.us/t/api-integration/25322>\
**Category:** API and Webhooks\
**Created:** [July 27, 2020, 12:42pm UTC](https://devforum.zoom.us/t/api-integration/25322 "2020-07-27T12:42:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![02ankit1989](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/02ankit1989/32/10936_2.png) [@02ankit1989](https://devforum.zoom.us/u/02ankit1989)\
**Post date:** [July 27, 2020, 12:42pm UTC](https://devforum.zoom.us/t/api-integration/25322/1 "2020-07-27T12:42:16Z")

</div>

hello, I integrated JWT in my application . all are good to go but only two problems are I am facing  
1.) I am not able to create multiple hosts at the same time if I create multiple meetings for multiple teachers who have to host, only one live streaming is open and when I go for others, it could not open and showing “network problem error”.  
2.)when I join as a participant into live class my name is showing like hostname.

anyone has the answer please reply and short out this problem sir/mam.

 ![Untitled](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/4/45d7d1d1d9f7efa74c1dc60ef2c86a098ae7ae59.png)  
code below

```
<!DOCTYPE html>
<head>
    <title><?php echo get_settings('system_name');?></title>
	 <link rel="icon" sizes="16x16" href="<?php echo base_url();?>uploads/logo.png">
    <meta charset="utf-8" />
    <link rel="stylesheet" href="<?php echo base_url('assets/bootstrap/css/all.min.css');?>">
	<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.7.9/css/bootstrap.css"/>
	<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.7.9/css/react-select.css"/>

    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body class="ReactModal__Body--open">
    <style type="text/css">
        body {
            padding-top: 50px;
        }
        .navbar-inverse {
            background-color: #313131;
            border-color: #404142;
        }
        .navbar-header h4 {
            margin: 0;
            padding: 15px 15px;
            color: #c4c2c2;
        }
        .navbar-right h5 {
            margin: 0;
            padding: 9px 5px;
            color: #c4c2c2;
        }
        .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form{
            border-color: transparent;
        }
    </style>
   <?php 
		$select = $this->db->get_where('live_stream', array('live_stream_id' => $live_stream_id))->result_array();
		foreach ($select as $key => $row) : 
		
		$user = explode('-', $row['created_by']);
		$user_type = $user[0];
		$user_id = $user[1];
		$hosted_class_by = $this->db->get_where($user_type, array($user_type . '_id' => $user_id))->row()->name;
		$account_type = $this->session->userdata('login_type');
   $user_name = $this->session->set_userdata('name', $row->name);
		
		?>
    <nav id="nav-tool" class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <h4><i class="fab fa-chromecast"></i> Live Class Title : <?php echo $row['title'];?></h4>
            </div>
            <div class="navbar-form navbar-right">
                <h5><i class="far fa-user-circle" style=""></i> Host By : <?php echo $hosted_class_by;?></h5>
            </div>
        </div>
    </nav>

	
	<script src="https://source.zoom.us/1.7.9/lib/vendor/react.min.js"></script>
	<script src="https://source.zoom.us/1.7.9/lib/vendor/react-dom.min.js"></script>
	<script src="https://source.zoom.us/1.7.9/lib/vendor/redux.min.js"></script>
	<script src="https://source.zoom.us/1.7.9/lib/vendor/redux-thunk.min.js"></script>
	<script src="https://source.zoom.us/1.7.9/lib/vendor/jquery.min.js"></script>
	<script src="https://source.zoom.us/1.7.9/lib/vendor/lodash.min.js"></script>
  
	<script src="https://source.zoom.us/zoom-meeting-1.7.9.min.js"></script>

  

    
    <script type="text/javascript">
        ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.9/lib', '/av'); 
        ZoomMtg.preLoadWasm();
        ZoomMtg.prepareJssdk();
        var meetConfig = {
            apiKey: "<?php echo $this->db->get_where('settings', array('type' => 'zoom_api_key'))->row()->description;?>",
            apiSecret: "<?php echo $this->db->get_where('settings', array('type' => 'zoom_api_secret_key'))->row()->description;?>",
            meetingNumber: "<?php echo $row['meeting_id'];?>",
            userName: "<?php echo $hosted_class_by;?>",
            passWord: "<?php echo $row['meeting_password']?>",
            leaveUrl: "<?php echo base_url() . $account_type.'/live_streaming' ;?>",
            role: parseInt(1, 0)
        };
        var signature = ZoomMtg.generateSignature({
            meetingNumber: meetConfig.meetingNumber,
            apiKey: meetConfig.apiKey,
            apiSecret: meetConfig.apiSecret,
            role: meetConfig.role,
            success: function(res){
                console.log(res.result);
            }
        });
        ZoomMtg.init({
            leaveUrl: meetConfig.leaveUrl,
            isSupportAV: true,
            showMeetingHeader: true, //option
                disableInvite: false, //optional
disableCallOut: false, //optional
disableRecord: false, //optional
disableJoinAudio: false, //optional
audioPanelAlwaysOpen: true, //optional
showPureSharingContent: false, //optional
isSupportAV: true, //optional,
isSupportChat: true, //optional,
isSupportQA: true, //optional,
isSupportCC: true, //optional,
screenShare: true, //optional,
rwcBackup: '', //optional,
videoDrag: true, //optional,
sharingMode: 'both', //optional,
videoHeader: true, //optional,
isLockBottom: true, // optional,
isSupportNonverbal: true, // optional,
isShowJoiningErrorDialog: true, // optional,
inviteUrlFormat: '', // optional
loginWindow: { // optional,
  width: 400,
  height: 380
},

            success: function () {
                ZoomMtg.join(
                    {
                        meetingNumber: meetConfig.meetingNumber,
                        userName: meetConfig.userName,
                        signature: signature,
                        apiKey: meetConfig.apiKey,
                        passWord: meetConfig.passWord,
                        success: function(res){
                            $('#nav-tool').hide();
                        },
                        error: function(res) {
                            console.log(res);
                        }
                    }
                );
            },
            error: function(res) {
                console.log(res);
            }
        });
    </script>
	<?php endforeach;?>

</body>

```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 29, 2020, 10:30pm UTC](https://devforum.zoom.us/t/api-integration/25322/3 "2020-07-29T22:30:38Z")

</div>

Hey @02ankit1989,

> [@02ankit1989](#):
>
> I am not able to create multiple hosts at the same time if I create multiple meetings for multiple teachers who have to host, only one live streaming is open and when I go for others, it could not open and showing “network problem error”.

What version of the Web SDK are you using? Can you please share steps to reproduce this issue?

> [@02ankit1989](#):
>
> when I join as a participant into live class my name is showing like hostname.

Are you passing in role `0` when generating your [Web SDK signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature) for joining as a participant?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 5, 2020, 10:30pm UTC](https://devforum.zoom.us/t/api-integration/25322/4 "2020-08-05T22:30:42Z")

</div>

Closed on August 5, 2020, 10:30pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
