Once you have a Chatbot Token, and a to_jid, you are ready to send a Chatbot Message.
Sending a Chatbot Message:
Make a POST request to /im/chat/messages
with the following authorization header and body:
Headers | Description |
---|---|
Authorization |
Bearer <CHATBOT_TOKEN> |
Body | Description |
---|---|
robot_jid |
Required, The BotJID found in the Chat Subscription Section on the Features page of your App Dashboard. |
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. |
account_id |
Required, The AccountID of your Zoom account. Get this from the Chatbot request sent to your server. |
content |
Required, The Object containing the JSON which forms the message. |
visible_to_user |
Optional, The UserID, allows a Chatbot to send a message to a group channel, but have only one designated person in that group channel see the message. |
user_jid |
Optional, The UserJID of the user on whose behalf the message is being sent. Used to prevent members of a channel from getting notifications that were set up by a user who has left the channel. |
is_markdown_support |
Optional, A Boolean, applies the markdown parser to your Chatbot message if set to true . See the Chatbot message markdown reference. |
Example Request
POST
https://api.zoom.us/v2/im/chat/messages
Request Headers:
{
'Authorization': 'Bearer eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiI8S0lEPiJ9.eyJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJ2ZXIiOiI2IiwibmJmIjoxNTgwMTQ2NjkzLCJjbGllbnRJZCI6IjxDbGllbnRfSUQ-IiwiaXNzIjoidXJuOnpvb206Y29ubmVjdDpjbGllbnRpZDo8Q2xpZW50X0lEPiIsImF1dGhlbnRpY2F0aW9uSWQiOiI8QXV0aGVudGljYXRpb25fSUQ-IiwiZXhwIjoxNTgwMTUwMjkzLCJ0b2tlblR5cGUiOiJjbGllbnRfdG9rZW4iLCJpYXQiOjE1ODAxNDY2OTMsInVzZXJJZCI6IjxVc2VyX0lEPiIsImdyb3VwTnVtYmVyIjowLCJqdGkiOiI8SlRJPiJ9.chgzEaGxeYl3alAaLsFSRvQFVRqoabM5BINVELOYPO1FqveoEk02i8AIGrtg0FiX779pMWpMObkxFnPQy7euNA'
}
Request Body:
{
'robot_jid': 'v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us',
'to_jid': 'kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us',
'account_id': 'gVcjZnWWRLWvv_GtyGuaxg',
'content': {
'head': {
'text': 'Hello World'
}
}
}
If successful, the response body will be a JSON representation of your Chatbot message:
{
'message_id': '20190617170855488_1Cu0Fxp_aw1',
'robot_jid': 'v1m0yn1imztuogsxjje8fdew@xmpp.zoom.us',
'sent_time': '2019-06-17 17:08:55',
'to_jid': 'kdykjnimt4kpd8kkdqt9fq@xmpp.zoom.us'
}
Chatbot Message