Questions related to /im/users/{userId}/chat/messages endpoint

Hello,

I have some questions related to the new endpoint /im/users/{userId}/chat/messages:

  • Does the endpoint return both 1:1 and group chat messages for a given user?

  • What is the “userId” path parameter and “chat_user” query parameter? Does both of those parameters expect Id of the sender of the messages?

  • Which query parameters are required?

Hi @snpatel_zoom,

  1. This is both Channel and 1:1 group chats
  2. usersID is the current users ID and the chat_user is the person who you want to retrieve the messages from.
  3. You either needs to use chat_user or channelID.

Thanks

1 Like

Hi @michael_p.zoom , can you let us know how we can get channelIDs ?

Hey @hagop,

Our GET Channels Endpoint was recently deprecated and removed from our docs, but we have a new Get Channels Endpoint coming soon.

In the meantime, here is the deprecated endpoint, use with caution until the new ones are out.

GET /im/users/{{ USER ID }}/channels

HEADERS: "Authorization": "Bearer {{ ACCESS TOKEN }}"

The group_jid in the response will work as the channelID.

Be sure to subscribe to our release log here so you will be notified when the new Chat API’s are released.

Thanks,
Tommy

1 Like

Thanks @tommy for the prompt response, we’ll look forward to further updates.

1 Like

You are welcome, happy to help!