Automate sending messages

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.

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 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

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 for more info.

Let us know if you need anything else.

Thanks

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

Thanks
Prasanth

Hey @prasanth.pendham,

You can send messages to channels now with POST /im/chat/messages, by passing in a Channel JID as the to_jid. This can be accomplished using a Chatbot, or OAuth 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)

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

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

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

Let me know if that helps!

Thanks,
Tommy

Thanks @tommy for your response.

1 Like

Happy to help!

Let us know if you have any other questions!

Thanks,
Tommy

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

Hey @prasanth.pendham,

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

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

1 Like

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” but i keep getting HTTP/1.1 302 Found message. Any thoughts on what i might be missing.

Thanks
Prasanth

Hey @prasanth.pendham,

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

Try this

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

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.”

});

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

Thanks
Prasanth

Hey @prasanth.pendham,

Happy to hear you can get your access token now! :slight_smile:

Do you mind sharing what the issue was?

Thanks,
Tommy

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

1 Like

Thanks for sharing @prasanth.pendham :slight_smile:

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

Thanks,
Tommy

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

Thanks
Prasanth

1 Like

Thank you @prasanth.pendham! :slight_smile:

You are welcome and thanks for your assistance

1 Like

Of course! Happy to help!