Posting message with Chat Bot results in 200, but no message visible

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 :frowning: )

Hi @Alexandra
Just checking in with you about this issue.
Were you able to troubleshoot it?

Hi Elisa,

The core issue is still happening last I checked, and doesn’t make sense – I think that the docs should be updated to say that the user_jid param is required, and the response returned from the API shouldn’t be a 200 when the message isn’t actually posted.

I did work around this for my own case though by adding the user:read:admin scope and querying the /users/{userId} endpoint with the current user’s email address as the userID, then getting their JID from the response and passing that along into the chat params. But this isn’t a great solution, it won’t work if the email address they use to log into our service doesn’t match the one they use to log into Zoom, and it requires a large admin permission that I’d rather not ask for (and might reduce the likelihood of an organization installing our app).

Thanks,
Alexandra

Thanks for confirming this @Alexandra
I will take a look into this again and troubleshoot on my end
I will keep you updated.

Cheers,
Elisa

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.