I couldn't search the chat room using "members_include_in".

I want to search for a chat room with a user id of partner04 or partner01.

So I used the fields, “members_include_in” and “query_type”.

But it was returned with an empty value.

  1. Item entered within “members_include_in” : “partner01%2C%20partner04”
    (Also I tried “partner01, partner04”)
  2. Item entered within “query_type” : “OR”

How can I do?

Hi @Jinny, I think that you don’t need to encode the whole value of members_include_in. Urlencoding each ID is recommended (for example, members_include_in= urlencoded_user_id_1, urlencoded_user_id_2 ). I tried the way as your second try on the postman. It works well. The “partner01, partner04” which you tried seems that it has white space after the comma. Could you please try it again without space after the comma?

Thank you for your answer.

1] I couldn’t get any chat rooms even though calling without white space after comma.

2] It works well if I called by adding just one of member ID to “members_include_in”, the chat room will be returned.

3] However, if more than one of member Ids is inserted, it returns the empty array.

4] The url I tested is as follows.

[Sendbird List my group channels URL]
https://api-{SENDBIRD_APPLICATION_ID}.sendbird.com/v3/users/member01/my_group_channels?show_empty=true&order=latest_last_message&show_member=true&query_type=OR&members_include_in=partner05,partner04

What am I missing?

Hi @Jinny, Seems that the server couldn’t find a channel with your logic. According to your endpoint, you are searching for a channel that has partner05 or partner04 in member01’s channel list, right?

I tried as your endpoint, it works well. You can see it in the following screenshot.

Thank you so much.
I solved my problem with your answer.

When calling API, the problem of sending encoded commas was caused.

Thank you for your answer.

1 Like