# Chat Message Webhook for out-of-org replies

**URL:** <https://devforum.zoom.us/t/chat-message-webhook-for-out-of-org-replies/31796>\
**Category:** Feature Requests\
**Created:** [September 30, 2020, 5:51pm UTC](https://devforum.zoom.us/t/chat-message-webhook-for-out-of-org-replies/31796 "2020-09-30T17:51:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric.franzen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/eric.franzen/32/8213_2.png) [@eric.franzen](https://devforum.zoom.us/u/eric.franzen)\
**Post date:** [September 30, 2020, 5:51pm UTC](https://devforum.zoom.us/t/chat-message-webhook-for-out-of-org-replies/31796/1 "2020-09-30T17:51:49Z")

</div>

**Description**  
Chat Message webhooks only fire when an in-org user sends a Zoom Chat message.

This means that applications leveraging Chat Message webhooks only receive one side of the chat conversation.

Capturing both sides requires polling the /chat/users/{userId}/messages API endpoint, which is a discouraged design pattern for Zoom Marketplace apps.

**One-sided Chat Messages (using Chat Message Webhooks)**

```auto
[
    {
        "event": "chat_message.sent",
        "payload": {
            "account_id": "foo",
            "operator": "john.smith@gmail.com",
            "operator_id": "8ixdgGR5RcmeIBd8XzRHIg",
            "object": {
                "date_time": "2020-09-30T16:13:38Z",
                "parent_msg_id": "67360091-581D-401E-BF11-B560495FE2E5",
                "session_id": "8ixdggr5rcmeibd8xzrhig:n8jsohe2trqzachvcat1qa",
                "id": "67360091-581D-401E-BF11-B560495FE2E5",
                "type": "to_contact",
                "contact_id": "n8JsOHE2TrqZacHVCat1qA",
                "message": "Just shared the above screenshot. ",
                "contact_email": "jane.smith@gmail.com",
                "timestamp": 1601482418156
            }
        }
    },
    {
        "event": "chat_message.sent",
        "payload": {
            "account_id": "foo",
            "operator": "john.smith@gmail.com",
            "operator_id": "8ixdgGR5RcmeIBd8XzRHIg",
            "object": {
                "date_time": "2020-09-30T16:10:27Z",
                "parent_msg_id": "C22C35BD-1681-4DCF-960E-05EEDE9AD2F4",
                "session_id": "8ixdggr5rcmeibd8xzrhig:n8jsohe2trqzachvcat1qa",
                "id": "C22C35BD-1681-4DCF-960E-05EEDE9AD2F4",
                "type": "to_contact",
                "contact_id": "n8JsOHE2TrqZacHVCat1qA",
                "message": "Just shared the above code snippet",
                "contact_email": "jane.smith@gmail.com",
                "timestamp": 1601482227874
            }        
        }    
    },
    {
        "event": "chat_message.sent",
        "payload": {
            "account_id": "foo",
            "operator": "john.smith@gmail.com",
            "operator_id": "8ixdgGR5RcmeIBd8XzRHIg",
            "object": {
                "date_time": "2020-09-30T16:08:21Z",
                "parent_msg_id": "B61A5290-2A09-4DD7-AFED-460BACF96D56",
                "session_id": "8ixdggr5rcmeibd8xzrhig:n8jsohe2trqzachvcat1qa",
                "id": "B61A5290-2A09-4DD7-AFED-460BACF96D56",
                "type": "to_contact",
                "contact_id": "n8JsOHE2TrqZacHVCat1qA",
                "message": "Reply received!",
                "contact_email": "jane.smith@gmail.com",
                "timestamp": 1601482101912
            }
        }
    },
    {
        "event": "chat_message.sent",
        "payload": {
            "account_id": "foo",
            "operator": "john.smith@gmail.com",
            "operator_id": "8ixdgGR5RcmeIBd8XzRHIg",
            "object": {
                "date_time": "2020-09-30T16:06:44Z",
                "parent_msg_id": "0E0F67E1-2A68-468B-9EDE-3E8057BCCC1E",
                "session_id": "8ixdggr5rcmeibd8xzrhig:n8jsohe2trqzachvcat1qa",
                "id": "0E0F67E1-2A68-468B-9EDE-3E8057BCCC1E",
                "type": "to_contact",
                "contact_id": "n8JsOHE2TrqZacHVCat1qA",
                "message": "Zoom Chat test. Sent by user inside Zoom org. \ud83d\udc4b",
                "contact_email": "jane.smith@gmail.com",
                "timestamp": 1601482004918
            }
        }
    }
]

```

**All Chat Messages (using GET /chat/users/{userId}/messages endpoint)**

```auto
    {
        "date": "2020-09-30",
        "page_size": 10,
        "next_page_token": "",
        "messages": [
            {
                "id": "67360091-581D-401E-BF11-B560495FE2E5",
                "message": "Just shared the above screenshot. ",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:13:38Z",
                "timestamp": 1601482418156
            },
            {
                "id": "E658BAA2-2CE5-45BD-AD2F-0152B182EE06",
                "message": "John Smith has sent you an image",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:12:54Z",
                "timestamp": 1601482374754
            },
            {
                "id": "C22C35BD-1681-4DCF-960E-05EEDE9AD2F4",
                "message": "Just shared the above code snippet",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:10:27Z",
                "timestamp": 1601482227874
            },
            {
                "id": "2FD473BD-70AE-4D5C-BCE8-BB599BEB3CB3",
                "message": "John Smith has sent you a code snippet",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:10:15Z",
                "timestamp": 1601482215726
            },
            {
                "id": "B61A5290-2A09-4DD7-AFED-460BACF96D56",
                "message": "Reply received!",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:08:21Z",
                "timestamp": 1601482101912
            },
            {
                "id": "0CD63C0A-07C6-4CB0-943C-E96343BD1A07",
                "message": "Hello! This is a reply from a user outside the Zoom org.",
                "sender": "jane.smith@gmail.com",
                "date_time": "2020-09-30T16:08:08Z",
                "timestamp": 1601482088937
            },
            {
                "id": "0E0F67E1-2A68-468B-9EDE-3E8057BCCC1E",
                "message": "Zoom Chat test. Sent by user inside Zoom org. \ud83d\udc4b",
                "sender": "john.smith@gmail.com",
                "date_time": "2020-09-30T16:06:44Z",
                "timestamp": 1601482004918
            }
        ]
    }

```

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
Account-level OAuth 2.0

**Which Endpoint/s?**  
API: GET /chat/users/{userId}/messages  
Webhook: chat\_message.sent
