# LaunchAppInMeeting not working as expected

**URL:** <https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131>\
**Category:** Zoom Apps\
**Created:** [November 21, 2022, 7:14pm UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131 "2022-11-21T19:14:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [November 21, 2022, 7:14pm UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/1 "2022-11-21T19:14:56Z")

</div>

Errors with `launchAppInMeeting`

The `joinUrl` seems to be ignored and it’s always creating a new meeting.

How exactly is this method working?

Also, are there other alternative ways to launch a meeting? It would be nice to just pass the `id` and the `passcode` instead of passing a `joinURL`

A payload would also be nice with this method. So that we can pass a custom message to the instance of the app in the meeting that will start.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 22, 2022, 9:55pm UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/3 "2022-11-22T21:55:49Z")

</div>

In my testing the meeting provided in the joinURL is what was opened by that function.

What version of the Zoom Client and Zoom Apps JS SDK are you using?

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [November 22, 2022, 10:13pm UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/4 "2022-11-22T22:13:10Z")

</div>

Hey,

Turns out that I had `joinUrl` instead of `joinURL`.

it’s working now, but I wish that there was some message returned saying invalid / missing options were passed in. Would have saved me a bunch of time.

Any plans to implement a payload, similar to the `action` payload in the deeplink method?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 28, 2022, 11:05pm UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/5 "2022-11-28T23:05:47Z")

</div>

I’m not aware of plans to add a payload to this API just yet. You should be able to use the [onConnect](https://marketplace.zoom.us/docs/zoom-apps/js-sdk/reference/#onConnect) or OnMeeting event to run code when the in-meeting instance is started.

Would that work for your use case?

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [November 29, 2022, 8:20am UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/6 "2022-11-29T08:20:06Z")

</div>

Interesting. The documentation for those methods is pretty confusing and the linked guide leads to a 404 url.

Where can i see an example of how those methods work from both sides? And the differences between them?

There seem to be 3 methods - `onConnect`, `onMessage`, and `onMeeting`.

When and how do we use them?

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [November 29, 2022, 8:55am UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/7 "2022-11-29T08:55:13Z")

</div>

I would love to see a complete working example for clarity. Glancing over the docs, I’m struggling to see how this works because the connect methods say they can only be called from the meeting instance, not the panel instance. But the payload I need to pass is in the panel instance. Can you tell me what the setup and flow should look like for this to work?

1. from panel - `zoomSdk.launchappinmeeting({joinURL})`
2. from panel - send json data to meeting instance.
3. In meeting - receive data and update ui.

Does `postMessage` only work after `connect`?  
Do both `panel` and `meeting` have access to `postMessage`?

Is the flow something like this?

1. meeting - `zoomSdk.connect()`
2. meeting - `zoomSdk.onConnect(... zoomSdk.postMessage("send me data"))`
3. panel - `zoomSdk.onMessage(... zoomSdk.postMessage({JSON DATA}))`
4. meeting - `zoomSdk.onMessage(... render ui with data )`

This is the guide that is linked to in the docs but it’s a 404

[https://marketplace.zoom.us/docs/beta-docs/zoom-apps/guides/maintaining-state/](https://marketplace.zoom.us/docs/beta-docs/zoom-apps/guides/maintaining-state/)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 2, 2022, 2:05am UTC](https://devforum.zoom.us/t/launchappinmeeting-not-working-as-expected/79131/8 "2022-12-02T02:05:04Z")

</div>

@RostislavR  
Strange that the above link was broken, you can find it in our [SDK Reference](https://marketplace.zoom.us/docs/zoom-apps/js-sdk/reference/) if you haven’t seen it already.

In the customlayout example, we have examples of using connect and onConnect, and onMeeting:

> <https://github.com/zoom/zoomapps-customlayout-js/blob/beb1b3f2368cec3a2112f24da7b15fd813d27466/public/js/index.js#L360-L373>

Here is an example of how you can call the connect function from within the meeting instance to connect to the client instance

> <https://github.com/zoom/zoomapps-customlayout-js/blob/beb1b3f2368cec3a2112f24da7b15fd813d27466/public/js/index.js#L587>

Let me know if that helps. If not, let me know what would be helpful.
