# Error when try to change host

**URL:** <https://devforum.zoom.us/t/error-when-try-to-change-host/62822>\
**Category:** Web\
**Created:** [January 18, 2022, 1:50pm UTC](https://devforum.zoom.us/t/error-when-try-to-change-host/62822 "2022-01-18T13:50:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![reactdev](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@reactdev](https://devforum.zoom.us/u/reactdev)\
**Post date:** [January 18, 2022, 1:50pm UTC](https://devforum.zoom.us/t/error-when-try-to-change-host/62822/1 "2022-01-18T13:50:15Z")

</div>

I try to change host on button click.

This is function

```auto
 const changeHost = async () => {
        const currentUser = await zmClient.getCurrentUserInfo();
        await zmClient.makeHost(currentUser.userId);
}

```

Get error

1. reason: “operation is not applicable to self”
2. type: “INVALID\_OPERATION”

Can host be changed on this way?

---

<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:** [February 17, 2022, 11:51pm UTC](https://devforum.zoom.us/t/error-when-try-to-change-host/62822/2 "2022-02-17T23:51:08Z")

</div>

Closed on February 17, 2022, 11:51pm UTC

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