# Chatbot for a sub group

**URL:** <https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123>\
**Category:** API and Webhooks\
**Created:** [December 18, 2019, 4:21pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123 "2019-12-18T16:21:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mosman](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mosman](https://devforum.zoom.us/u/mosman)\
**Post date:** [December 18, 2019, 4:21pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/1 "2019-12-18T16:21:07Z")

</div>

Hi,

I am developing a chatbot, is there a way to limit the chatbot to 2 or 3 users until is it ready ? right the welcome msg goes to everybody under the company account

thanks,  
MO

---

<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:** [December 18, 2019, 9:19pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/2 "2019-12-18T21:19:35Z")

</div>

Hey @mosman, thanks for posting and using Zoom!

There are 2 ways to limit who can see Chatbot messages:

1. Only send Chatbot messages to a Zoom Chat Channel with the desired users, or a Specific user by setting the `to_jid` in the Chatbot request body to that respective channel. You can get the JID of a Channel or User via our Chatbot events:

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

[https://marketplace.zoom.us/docs/api-reference/webhook-reference/chatbot-events/user-commands](https://marketplace.zoom.us/docs/api-reference/webhook-reference/chatbot-events/user-commands)

and / or

1. Set the `visible_to_user` value so only the userID specified sees the message.

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

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![mallik.zoomit](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mallik.zoomit](https://devforum.zoom.us/u/mallik.zoomit)\
**Post date:** [February 18, 2020, 11:09am UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/3 "2020-02-18T11:09:35Z")

</div>

Hi Tommy,

I am developing a chatbot and able to send chat message.  
The message is just going to the the userid  
however “to\_jid”: “\<\>”, is set to user id.  
I would like to send messages to one of my created channel.  
In the document it is mention as below:

**`to_jid` Required , The JID of the Channel or User you want the message sent to. Get this from the Chatbot request sent to your server.**

How do I get the JID of a Channel which I have created?

Regards,  
Mallik

---

<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:** [February 18, 2020, 5:08pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/4 "2020-02-18T17:08:09Z")

</div>

Hey @mallik.zoomit, thanks for posting and using Zoom!

You can get a Channel JID by [sending a slash command from the Channel you want to use](https://marketplace.zoom.us/docs/api-reference/webhook-reference/chatbot-events/user-commands).

In the [Webhook payload](https://marketplace.zoom.us/docs/api-reference/webhook-reference/chatbot-events/user-commands), the toJid will be the Channel JID.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![mallik.zoomit](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@mallik.zoomit](https://devforum.zoom.us/u/mallik.zoomit)\
**Post date:** [February 19, 2020, 5:37am UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/5 "2020-02-19T05:37:57Z")

</div>

Hi Tommy,

Thanks for your quick reply.

What am looking is instead of using slash command from channel, is there away wherein we get channel’s jid’s.

Example:

I have created DemoChatApp .  
From my DemoChatApp am able to get client id ,secret key and Bot JID.  
With my credentials able to login and see my created App and created a new channel.  
Now I want to send message to my channel.

I want to send message using postman API calls .  
**[https://api.zoom.us/v2/im/chat/messages](https://api.zoom.us/v2/im/chat/messages)**

“to\_jid”: “\<\<\>\>”,//channel’s jid.  
How do I get channels JID without using slash command executed on my server.

Thanks,  
Mallik

---

<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:** [February 19, 2020, 4:56pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/6 "2020-02-19T16:56:56Z")

</div>

Hey @mallik.zoomit,

You can get Channel Jids via our [Get Channels endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-channels/getchannels). Due note that as of now you need a [User Level OAuth app](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app) to do this. We are working to make this endpoint compatible with Account Level OAuth / Chatbot apps.

Take the channel id from the response, and append `@conference.xmpp.zoom.us` to it.

`jid = id + "@conference.xmpp.zoom.us"`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:25pm UTC](https://devforum.zoom.us/t/chatbot-for-a-sub-group/7123/7 "2020-08-21T19:25:17Z")

</div>


