# Automate sending messages

**URL:** <https://devforum.zoom.us/t/automate-sending-messages/5877>\
**Category:** API and Webhooks\
**Created:** [September 12, 2019, 2:30pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877 "2019-09-12T14:30:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 2:30pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/1 "2019-09-12T14:30:59Z")

</div>

Hi Team,

I am working on automation of sending messages to zoom Groups using following rest api [https://marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot](https://marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot).

Sending of messages is just a one way communication i.e, chatbot is used only for transferring the messages to the groups. I tried going through the submission list of chatbot [https://marketplace.zoom.us/docs/guides/app-lifecycle-management/submitting-an-app/submission-checklist](https://marketplace.zoom.us/docs/guides/app-lifecycle-management/submitting-an-app/submission-checklist) but seems very exhaustive. Is there a simple way to create a chatbot or is there any other approach to make the api calls without need to chatbot?

Thanks  
Prasanth

Thanks

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [September 12, 2019, 2:51pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/2 "2019-09-12T14:51:04Z")

</div>

Hi @prasanth.pendham,

Yes, if you would like to submit a chatbot you do have to abide by our marketplace submission guidelines. However, we are releasing user level Chat APIs at the end of this month to send messages to users. Please refer to our [upcoming API page](https://marketplace.zoom.us/docs/guides/getting-started/stay-up-to-date/upcoming-changes/api) for more info.

Let us know if you need anything else.

Thanks

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 2:53pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/3 "2019-09-12T14:53:15Z")

</div>

Thanks @michael_p.zoom for your response. Does user level Chat APIs work for sending messages to zoom channels also?

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 12, 2019, 7:09pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/4 "2019-09-12T19:09:22Z")

</div>

Hey @prasanth.pendham,

You can send messages to channels now with [POST /im/chat/messages](https://marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot), by passing in a Channel JID as the `to_jid`. This can be accomplished using a [Chatbot](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-chatbot-app), or [OAuth](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app) App Type.

To find a channels `to_jid` here is how you call the Get channels endpoint (note this is deprecated, but will be replaced by the new Chat API’s coming later this month)

> [@Questions related to /im/users/{userId}/chat/messages endpoint](https://devforum.zoom.us/t/questions-related-to-im-users-userid-chat-messages-endpoint/3467/4):
>
> Hey @hagop, Our GET Channels Endpoint was recently deprecated and removed from our docs, but we have a new Get Channels Endpoint coming soon. In the meantime, here is the deprecated endpoint, use with caution until the new ones are out. GET /im/users/{{ USER ID }}/channels HEADERS: "Authorization": "Bearer {{ ACCESS TOKEN }}" The group\_jid in the response will work as the channelID. Be sure to [subscribe to our release log](https://marketplace.zoom.us/docs/changelog) here so you will be notified when the new Chat API’s are released. T…

Here is a tutorial on how to create a Chatbot from scratch,

[https://marketplace.zoom.us/docs/guides/chatbots/build-a-chatbot](https://marketplace.zoom.us/docs/guides/chatbots/build-a-chatbot)

Here is a tutorial on how to quickly send/test Chatbot messages,

[https://marketplace.zoom.us/docs/guides/tools-resources/postman/using-postman-to-test-zoom-chatbots](https://marketplace.zoom.us/docs/guides/tools-resources/postman/using-postman-to-test-zoom-chatbots)

And here is a sample app using our Chatbot NPM package.

> **[GitHub - zoom/vote-chatbot: Vote on topics in Zoom Chat](https://github.com/zoom/vote-chatbot)**
>
> Vote on topics in Zoom Chat

Let me know if that helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 7:27pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/5 "2019-09-12T19:27:22Z")

</div>

Thanks @tommy for your response.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 12, 2019, 7:33pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/6 "2019-09-12T19:33:59Z")

</div>

Happy to help!

Let us know if you have any other questions!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 7:36pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/7 "2019-09-12T19:36:30Z")

</div>

Is it possible to get the channel/Group ID from zoom app UI and also how can i add my chatbot app to a group?

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 12, 2019, 8:39pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/8 "2019-09-12T20:39:49Z")

</div>

Hey @prasanth.pendham,

> [@prasanth.pendham](#):
>
> Is it possible to get the channel/Group ID from zoom app UI

Unfortunately no. You could also get the channel JID from request body sent to your Bot Endpoint URL.

[https://marketplace.zoom.us/docs/guides/chatbots/sending-messages#user-commands](https://marketplace.zoom.us/docs/guides/chatbots/sending-messages#user-commands)

> [@prasanth.pendham](#):
>
> how can i add my chatbot app to a group?

Chatbots are added at the Account Level, so any channel/user can use the Slash Command to use the Chatbot, and the Chatbot can send messages to any user or channel using the `to_jid`.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 10:46pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/9 "2019-09-12T22:46:11Z")

</div>

Hey @tommy I am trying to generate access token using “curl -v -i -H ‘Accept:application/json’ -H ‘Authorization:Basic base64Encode({myclientID}:{myclientSecret})’ [https://api.zoom.us/oauth/token?grant\_type=client\_credentials](https://api.zoom.us/oauth/token?grant_type=client_credentials)” but i keep getting HTTP/1.1 302 Found message. Any thoughts on what i might be missing.

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 12, 2019, 10:58pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/10 "2019-09-12T22:58:45Z")

</div>

Hey @prasanth.pendham,

You are missing the `-X POST` param to make it specify a POST request.

Try this

```auto
curl -X POST -v -i -H 'Accept:application/json' -H 'Authorization:Basic base64Encode({myclientID}:{myclientSecret})' https://api.zoom.us/oauth/token\?grant_type\=client_credentials

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 12, 2019, 11:12pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/11 "2019-09-12T23:12:28Z")

</div>

Sorry my bad. Below is part of the output that i see now with addition of `-X POST` in my curl. It is displaying full html content in the output but i was just expecting access token

“billing.pastdue.pay\_online”:“Please \<a href=”/billing/report" onClick=“ga(‘send’, ‘event’, ‘billing’, ‘click-pastdue-paynow-link’, ‘Past Due Notification Pay Now Link’);”\>click here to pay online or call us at 1.888.799.9666 right away to avoid disruption to your service.",

“billing.pastdue.contact\_sales”:“Please \<a href=”/contactsales"\>contact sales or call us at 1.888.799.9666 right away to avoid disruption to your service.",

“meeting.upcoming\_meetings”:“Upcoming Meetings”,

“meeting.current.start\_this\_meeting”:“Would you like to start this meeting?”,

“meeting.current.start\_these\_meetings”:“Would you like to start one of these meetings?”,

“meeting.current.view\_more”:“View more…”,

“meeting.current.start\_new\_meeting”:“Start a New Meeting”,

“meeting.password.opt\_out\_acceptChange\_success”:“Passwords will be enabled by default on {0} for your account.”,

“meeting.password.opt\_out\_success”:“Passwords will not be enabled by default for your account.”,

“meeting.opt\_out\_desc.zr\_upgrade1”:“Passwords will be enabled by default on {0} for your account.”,

“meeting.opt\_out\_desc.zr\_upgrade2”:“We recommend upgrading your \<a href=”/location"\>Zoom Rooms and Zoom Rooms Controller to the latest version for an optimal join experience",

“meeting.password.opt\_out\_notice\_title”:“Important Update”,

“meeting.password.opt\_out\_notice”:“Zoom will update your account settings to turn on passwords by default for meetings and webinars on {0}. \<a href=“javascript:void(0)” onclick=“showMeetingPassWordOptOut()”\>Click here to learn more or if you wish to opt out of this change.”

});

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 13, 2019, 2:08pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/12 "2019-09-13T14:08:36Z")

</div>

I am able to get access token given clientId and clientSecret using my curl command.

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 13, 2019, 5:13pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/13 "2019-09-13T17:13:07Z")

</div>

Hey @prasanth.pendham,

Happy to hear you can get your access token now! 🙂

Do you mind sharing what the issue was?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 13, 2019, 5:22pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/14 "2019-09-13T17:22:46Z")

</div>

Hey @tommy,

I am not exactly sure what the issue was but able to get the access token generated using postman first and then from postman got my curl command generated.

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 13, 2019, 5:26pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/15 "2019-09-13T17:26:01Z")

</div>

Thanks for sharing @prasanth.pendham 🙂

If you think It would be helpful feel free to share the curl command here for others who have the same question!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 13, 2019, 5:27pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/16 "2019-09-13T17:27:36Z")

</div>

`curl -X POST \ 'https://api.zoom.us/oauth/token?grant_type=client_credentials' \ -H 'Authorization: Basic myAuthorizationKey'`

Thanks  
Prasanth

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 13, 2019, 5:28pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/17 "2019-09-13T17:28:18Z")

</div>

Thank you @prasanth.pendham! 🙂

---

<div class="post-metadata">

**Author:** ![prasanth.pendham](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/prasanth.pendham/32/2341_2.png) [@prasanth.pendham](https://devforum.zoom.us/u/prasanth.pendham)\
**Post date:** [September 13, 2019, 5:30pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/18 "2019-09-13T17:30:02Z")

</div>

You are welcome and thanks for your assistance

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 13, 2019, 5:31pm UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/19 "2019-09-13T17:31:22Z")

</div>

Of course! Happy to help!

---

<div class="post-metadata">

**Author:** ![hoozifachi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hoozifachi/32/5961_2.png) [@hoozifachi](https://devforum.zoom.us/u/hoozifachi)\
**Post date:** [April 13, 2020, 11:48am UTC](https://devforum.zoom.us/t/automate-sending-messages/5877/20 "2020-04-13T11:48:18Z")

</div>

The Build a Chatbot documentation might be a little out-of-date. It says to put " Zoom Development Bot JID, and Zoom Verification Token (found on your Zoom Features page)" in the .env file.

The code in index.js expects the jid.

```auto
app.get('/authorize', (req, res) => {
  res.redirect('https://zoom.us/launch/chat?jid=robot_' + process.env.zoom_bot_jid);
});

```

I looked for the /launch/chat endpoint in the API reference, but I cannot seem to find it.

How do I find the jid? Or is there another way to launch the Zoom client with the chatbot?

Thanks,  
Jason

[Next page](https://devforum.zoom.us/t/automate-sending-messages/5877.md?page=2)
