Hello! I’m running into a strange issue with the Chatbot API that I’m hoping you could help resolve.
I have working code that posts messages to channels in Zoom. It all works well, but there’s one strange case: when I post a message to a public channel that the user_jid
in the payload doesn’t belong to, the API responds as if the message has been posted but the message isn’t actually visible in the channel. “Updating” the message also acts like it works in the API, but nothing shows up in the Zoom chat.
Example
This is what the payload looks like for the POST request to the im/chat/messages
endpoint.
data = {
'robot_jid': robot_jid,
'to_jid': conversation_id,
'account_id': account_id,
'is_markdown_support': True,
'content': content,
'user_jid': user_jid
}
And here is the response
{
"robot_jid": <robot_jid>,
"to_jid": <conversation_id>,
"sent_time": "2023-02-01 20:33:52",
"message_id": "20230201203352047_SBD8sfr_aw1",
"user_jid": <user_jid>
}
It looks like it worked, but the message doesn’t show in the chat! The user_jid
is not a member of the to_jid
channel, but I found out after debugging this post that that “optional” parameter is actually required, so I’ve been putting the user_jid
value of the person who installed the app since they have the required permissions to see all channels in the account. I can’t guarantee that I’ll have the user_jid
of a person who is in the public channel.
How can I make sure that this message shows up in the chat? Or is this a bug that can be fixed on Zoom’s side? Since the API call succeeds I can’t even reliably tell users whether the message was posted or not… The only way around this that I can see feels a little gross, which would be to use another API to get the list of members in the channel and just use the user_jid
of the first person there, but that feels quite hacky. (EDIT: I just tried that workaround and it doesn’t even work )