Send chatbot messages
POST
/im/chat/messages
Chatbot Messages
Scopes:
imchat:bot
Rate Limit Label:
Medium
Authorization Flow: Client Credentials Flow
To get authorized, make a POST request to
/oauth/token
endpoint with grant type as client_credentials
. Use
https://api.zoom.us/oauth/token?grant_type=client_credentials
as the endpoint for the request.You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex.
Basic base64Encode({client_id}:{client_sceret})
Next, use the token recieved (access_token) as a bearer token while making the POST /im/chat/messages request to send chatbot messages.
Learn more about how to authorize chatbots in the Chatbot Authorization guide.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://api.zoom.us/v2/im/chat/messages' \
--form 'account_id=""' \
--form 'content=""' \
--form 'robot_jid=""' \
--form 'to_jid=""'
响应示例响应示例
200 - 示例 1
{}
请求参数
Body 参数multipart/form-data
account_id
string
必需
content
object
必需
is_markdown_support
boolean
可选
Applies the markdown parser to your chatbot message if the value of this field is set to
true
.To learn more, refer to the Chatbot message markdown reference.
robot_jid
string
必需
to_jid
string
必需
user_jid
string
可选
The UserJID of the user on whose behalf the message is being sent. Use this field to prevent members of a channel from getting notifications that were set up by a user who has left the channel.
visible_to_user
string
可选
Allow a Chatbot to send a message to a group channel, but have only one designated person in that group channel see the message by providing the person's UserID in this field.
返回响应
修改于 2024-04-24 09:06:48