# postMessage only works for one direction (using Layers API)

**URL:** <https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286>\
**Category:** Zoom Apps\
**Created:** [November 21, 2024, 2:58pm UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286 "2024-11-21T14:58:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikron](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mikron/32/18634_2.png) [@Mikron](https://devforum.zoom.us/u/Mikron)\
**Post date:** [November 21, 2024, 2:58pm UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286/1 "2024-11-21T14:58:39Z")

</div>

I’m using an app based on the Zoom Layers API officially provided.

I managed to send messages from the side panel to the CameraMode view)  
The side panel view is using `this.zoomSdk.postMessage({});` and the camera view is using `this.zoomSdk.addEventListener("onMessage", this.onMessage);` to listen.

It works.  
But now I would like to send a message from the camera to the side panel. when I add `this.zoomSdk.addEventListener("onMessage", this.onMessage);` in the mounted() code, it doesn’t seem to get any messages. also not its own messages which it is successfully sending to the camera side.

What am I missing? I made sure I call the code in the right places.  
No errors on console either.

---

<div class="post-metadata">

**Author:** ![expertswho](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/expertswho/32/60945_2.png) [@expertswho](https://devforum.zoom.us/u/expertswho)\
**Post date:** [April 17, 2025, 12:42am UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286/2 "2025-04-17T00:42:20Z")

</div>

hi @Mikron ,  
Can you show your receiving code, do you get a received event, or nothing?  
I did not even consider sending messages back from the camera!

all the best

John

---

<div class="post-metadata">

**Author:** ![Mikron](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mikron/32/18634_2.png) [@Mikron](https://devforum.zoom.us/u/Mikron)\
**Post date:** [April 17, 2025, 7:13am UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286/3 "2025-04-17T07:13:21Z")

</div>

Nothing. Ended up with a workaround for my needs.

---

<div class="post-metadata">

**Author:** ![expertswho](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/expertswho/32/60945_2.png) [@expertswho](https://devforum.zoom.us/u/expertswho)\
**Post date:** [April 17, 2025, 8:47am UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286/4 "2025-04-17T08:47:05Z")

</div>

ok, I don’t know how many people are using this feature, but I did see another report that this function stopped working on their windows version, yet mac was ok, so I am interested because there may be a bug here to be fixed.  
all the best

John

---

<div class="post-metadata">

**Author:** ![expertswho](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/expertswho/32/60945_2.png) [@expertswho](https://devforum.zoom.us/u/expertswho)\
**Post date:** [April 17, 2025, 8:02pm UTC](https://devforum.zoom.us/t/postmessage-only-works-for-one-direction-using-layers-api/121286/5 "2025-04-17T20:02:26Z")

</div>

hi @Mikron ,  
Just for your information.  
I have the listener working to send messages to the camera view and to reply.  
It is hard to do because you can not get any real diags on error.  
note that this is between camera mode and the app window in the meeting.  
The apps window in the workplace app can not start the sdk and can not run message.

all the best

John
