# Sending messages to and from zoom

**URL:** <https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561>\
**Category:** API and Webhooks\
**Created:** [May 23, 2024, 1:53pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561 "2024-05-23T13:53:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 23, 2024, 1:53pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/1 "2024-05-23T13:53:59Z")

</div>

Our requirement is creating a mediator app to get the messages from the zoom and send the messages to zoom

We created an app in the zoom and added webhook url in the app to get the messages from the zoom and send the messages to zoom, here we are using grant\_type: ‘client\_credentials’ and get the token and then pass the token generated from the client\_credentials grant\_type to Send a chat message API(POST /chat/users/{userId}/messages) to send the messages to user but here if we pass the token generated from client\_credentials grant\_type to send message api(POST /chat/users/{userId}/messages) this error is getting “Invalid access token.”, Is there any grant\_type is there to send messages to send message api(POST /chat/users/{userId}/messages) other than using grant\_type: ‘authorization\_code’, because it requires user interaction means user context user should grant permission by logging-in with username and password after redirecting, we don’t want User interaction(user Context) in our requirement, Please provide any other grant\_types are there without user interaction(user context)

---

<div class="post-metadata">

**Author:** ![zoomrecords](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zoomrecords/32/8298_2.png) [@zoomrecords](https://devforum.zoom.us/u/zoomrecords)\
**Post date:** [May 23, 2024, 3:07pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/2 "2024-05-23T15:07:50Z")

</div>

You can create a `Server-to-Server` app and do a `POST` request to `https://zoom.us/oauth/token?grant_type=account_credentials&account_id=` to get the `access_token`

In that app, you can add event subscriptions for your webhook.

The `access_token` will expire every 1 hour, so you can schedule a script to refresh it every 30min or so.

Hope that helps.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 24, 2024, 3:59am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/3 "2024-05-24T03:59:10Z")

</div>

Thank you for your reply, i already tried with grant\_type=account\_credentials but when i create a `Server-to-Server` app and add test Event notification endpoint URL in event subscription i am getting Please validate your endpoint URL.error is coming, Is it because of test url i used or what ?

If i use production url this error goes ?

For testing purpose i used some test webhook url from the google and pasted in the Event notification endpoint URL in event subscription to test the webhook is getting received messages from zoom or not but its giving validation error then, How Can i test whether webhook is getting received to and from messages from zoom? Can you help on this.

**and one more question:**  
If we generate token using grant\_type=account\_credentials Can pass that token to Send a chat message API(POST /chat/users/{userId}/messages) to send the messages to user without user interaction(user Context) ?

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 24, 2024, 11:48am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/4 "2024-05-24T11:48:57Z")

</div>

Hi Anh Nguyen,

When i create a Server-to-Server app, Even i added public production webhook url in the Event notification endpoint URL in event subscription i am getting “URL validation failed. Try again later.”.validation error , Can you help me how to resolve this error ?

---

<div class="post-metadata">

**Author:** ![dareveggen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dareveggen/32/59986_2.png) [@dareveggen](https://devforum.zoom.us/u/dareveggen)\
**Post date:** [May 25, 2024, 6:20am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/5 "2024-05-25T06:20:21Z")

</div>

Thanks for information hope that work

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 27, 2024, 4:18am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/6 "2024-05-27T04:18:29Z")

</div>

Hi Anh Nguyen, dareveggen,

Can you reply to the above question which i asked ?

the question is — When i create a Server-to-Server app, Even i added public production webhook url in the Event notification endpoint URL in event subscription i am getting “URL validation failed. Try again later.”.validation error , Can you help me how to resolve this error ?

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 27, 2024, 12:30pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/7 "2024-05-27T12:30:42Z")

</div>

Hi Anh Nguyen, dareveggen,

Now the Event notification endpoint webhook URL which i added in the event subscription is validated successfully but the webhook is not receiving any messages from zoom, Let me know any events needs to be added in the configuration to trigger webhook to receive messages, i added some events but the webhook is not getting triggered even i added the events, Could you please tell me what are all events to add to trigger webhook.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 28, 2024, 9:31am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/8 "2024-05-28T09:31:58Z")

</div>

Hi Anh Nguyen,

Chat Message event is not there to subscribe the Chat message event in the event subscription in server-to- server app , then which event captures chat messages from zoom workplace to trigger the webhook ?

---

<div class="post-metadata">

**Author:** ![zoomrecords](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zoomrecords/32/8298_2.png) [@zoomrecords](https://devforum.zoom.us/u/zoomrecords)\
**Post date:** [May 28, 2024, 4:29pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/9 "2024-05-28T16:29:18Z")

</div>

Hi durga,

Glad you figured out the endpoint URL.

What events have you added? Also, please provide some context of what action would trigger your webhook.

`Please provide any other grant_types are there without user interaction(user context)` Webhook does need some kind of action to trigger the app to send data to your endpoint.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 29, 2024, 6:22am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/10 "2024-05-29T06:22:10Z")

</div>

Hi Anh Nguyen,

I need **Chat Message event(Chat message sent, Chat message updated, Chat message deleted and Chat message replied)**

but those are not present in server-to- server app to subscribe the Chat message event in the event subscription , then which event captures chat messages from zoom workplace to trigger the webhook ?

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 29, 2024, 12:54pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/11 "2024-05-29T12:54:51Z")

</div>

Hi Anh Nguyen,

if an external user sends a message to our business account the webhook is not getting triggered and also not displaying messages from external user, If i Chat with external User from business account, the webhook is getting triggered and dispalying this `chat_message.sent` event and messages also from business account user, What we need to do to trigger webhook and display messages from external user ?

Could you please come to call or arrange a call i will explain my requirement.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 30, 2024, 5:11am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/12 "2024-05-30T05:11:10Z")

</div>

Hi Anh Nguyen,

Could you please answer to this query ?

if an external user sends a message to our business account the webhook is not getting triggered and also not displaying messages from external user, If i Chat with external User from business account, the webhook is getting triggered and dispalying this `chat_message.sent` event and messages also from business account user, What we need to do to trigger webhook and display messages from external user ?

Could you please come to call or arrange a call i will explain my requirement.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 31, 2024, 6:38am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/13 "2024-05-31T06:38:17Z")

</div>

Hi Anh Nguyen,

Please point me in the right direction, whether i am doing something wrong or some other method is there to achieve this flow

My requirement is , I am trying to achieve connector between zoom and my contact center and I am building a mediator app which will be listening to the webhook of zoom business account and also my contact center, so whenever customer sends a message i want to listen to the webhook of zoom business account and send it to the my contact center and if my contact center sends a message i want to send it back to the customer, i tested with account credentials grant type authorization and i am not getting the external user messages in the webhook So how exactly we can achieve this for internal user and external user.

If we want to listen to external user messages in the webhook what exactly need to be done ?

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 31, 2024, 11:27am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/14 "2024-05-31T11:27:38Z")

</div>

Hi @Anh Nguyen,

Please reply to the above question.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 31, 2024, 11:33am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/15 "2024-05-31T11:33:24Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please reply to the above question.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [May 31, 2024, 12:13pm UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/16 "2024-05-31T12:13:22Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please point me in the right direction, whether i am doing something wrong or some other method is there to achieve this flow

My requirement is , I am trying to achieve connector between zoom and my contact center and I am building a mediator app which will be listening to the webhook of zoom business account and also my contact center, so whenever customer sends a message i want to listen to the webhook of zoom business account and send it to the my contact center and if my contact center sends a message i want to send it back to the customer, i tested with account credentials grant type authorization and i am not getting the external user messages in the webhook So how exactly we can achieve this for internal user and external user.

If we want to listen to external user messages in the webhook what exactly need to be done ?

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [June 2, 2024, 9:57am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/17 "2024-06-02T09:57:21Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please reply to the above question.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [June 3, 2024, 5:13am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/18 "2024-06-03T05:13:57Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please reply to the above question.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [June 3, 2024, 10:35am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/19 "2024-06-03T10:35:27Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please reply to the above question.

---

<div class="post-metadata">

**Author:** ![durga.prasad](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@durga.prasad](https://devforum.zoom.us/u/durga.prasad)\
**Post date:** [June 3, 2024, 11:27am UTC](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561/20 "2024-06-03T11:27:25Z")

</div>

Hi @zoomrecords @Anh Nguyen,

Please point me in the right direction, whether i am doing something wrong or some other method is there to achieve this flow

My requirement is , I am trying to achieve connector between zoom and my contact center and I am building a mediator app which will be listening to the webhook of zoom business account and also my contact center, so whenever customer sends a message i want to listen to the webhook of zoom business account and send it to the my contact center and if my contact center sends a message i want to send it back to the customer, i tested with account credentials grant type authorization and i am not getting the external user messages in the webhook So how exactly we can achieve this for internal user and external user.

If we want to listen to external user messages in the webhook what exactly need to be done ?

[Next page](https://devforum.zoom.us/t/sending-messages-to-and-from-zoom/110561.md?page=2)
