# API login as host in a "Only authenticated users can join" meeting?

**URL:** <https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467>\
**Category:** Web\
**Created:** [April 1, 2020, 1:23pm UTC](https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467 "2020-04-01T13:23:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![f.barone](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/f.barone/32/9216_2.png) [@f.barone](https://devforum.zoom.us/u/f.barone)\
**Post date:** [April 1, 2020, 1:23pm UTC](https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467/1 "2020-04-01T13:23:02Z")

</div>

**Description**  
Hi, i’m trying the WEB SDK and see is possible to login as user trougth API:

```
ZoomMtg.join(
                        {
                            meetingNumber: meetConfig.meetingNumber,
                            userName: meetConfig.userName,
                            signature: res.result,
                            apiKey: meetConfig.apiKey,
                            userEmail: meetConfig.userEmail,
                            passWord: meetConfig.passWord,

```

But when i check it by :  
ZoomMtg.getAttendeeslist({});

i see:

```
* 1. result:
* 1. attendeesList: Array(1)
* 1. 0:
* 1. userId: XXXXXXX
* 2. participantId: 33
* 3. userName: "XXXXXXX"
* 4. muted: false
* 5. audio: ""
* 6. isHost: false
* 7. __proto__ : Object

```

The meeting is open, if i set “only register user can join” i jet Join Error 😕

**Which version?**  
1.7.2. local WebSdk sample app

Is possible to a “api” join a meeting as Host User ?

---

<div class="post-metadata">

**Author:** ![f.barone](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/f.barone/32/9216_2.png) [@f.barone](https://devforum.zoom.us/u/f.barone)\
**Post date:** [April 1, 2020, 2:49pm UTC](https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467/2 "2020-04-01T14:49:47Z")

</div>

**SOLVED**!

```
var meetConfig = {
        apiKey: API_KEY, 
        apiSecret: API_SECRET,      
        meetingNumber: .......,
        userName: "......",
        userEmail: "............",
        passWord: "......",
        leaveUrl: "https://zoom.us",
        **role: 1**
    };
...
ZoomMtg.join(
      {
       meetingNumber: meetConfig.meetingNumber,
       userName: meetConfig.userName,
       signature: res.result,
       apiKey: meetConfig.apiKey,
       userEmail: meetConfig.userEmail,
        passWord: meetConfig.passWord,

```

Use MeetingNumber associated as the userEmail and passWord  
and set role to 1 to join in a “Only authenticated users can join” meeting !!!

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [April 1, 2020, 3:39pm UTC](https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467/3 "2020-04-01T15:39:19Z")

</div>

Hi @f.barone,

We’re glad that you were able to resolved the issue. Please let us know if you need anything else.

Thanks

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:41pm UTC](https://devforum.zoom.us/t/api-login-as-host-in-a-only-authenticated-users-can-join-meeting/10467/4 "2020-08-21T19:41:52Z")

</div>

Closed on August 21, 2020, 7:41pm UTC


