# Cannot set is\_distinct when creating a group channel

**URL:** <https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348>\
**Category:** API\
**Created:** [November 10, 2021, 1:46am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348 "2021-11-10T01:46:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![saleh1222](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@saleh1222](https://community.sendbird.com/u/saleh1222)\
**Post date:** [November 10, 2021, 1:46am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/1 "2021-11-10T01:46:32Z")

</div>

Hi,  
for some reason when creating or updating a group channel, I am not able to set is\_distinct on the channel. What am I missing?  
the dto is as follows:  
public class SendbirdChannel {  
private String user\_ids;  
private String name;  
private boolean is\_public;  
private boolean is\_distinct;  
}  
thanks.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [November 10, 2021, 1:56am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/2 "2021-11-10T01:56:17Z")

</div>

Hi @saleh1222,

Welcome to the Sendbird community! Are you utilizing the Platform API or a specific SDK?

---

<div class="post-metadata">

**Author:** ![saleh1222](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@saleh1222](https://community.sendbird.com/u/saleh1222)\
**Post date:** [November 10, 2021, 2:07am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/3 "2021-11-10T02:07:15Z")

</div>

Hi,  
The platform API.

Thanks.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [November 10, 2021, 2:39am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/4 "2021-11-10T02:39:45Z")

</div>

Hi @saleh1222,

It looks like you’re making a distinct public channel which is not possible. A channel and not be both distinct and public as someone joining the public channel would immediately break the distinctness of the channel.

---

<div class="post-metadata">

**Author:** ![saleh1222](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@saleh1222](https://community.sendbird.com/u/saleh1222)\
**Post date:** [November 10, 2021, 2:42am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/5 "2021-11-10T02:42:55Z")

</div>

Thanks for the quick response. The channel type is group though.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [November 10, 2021, 2:57am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/6 "2021-11-10T02:57:28Z")

</div>

Hi @saleh1222,

Can you share with me the cURL request you’re making? A group channel can either be public or distinct, so it would be best to know exactly what you’re passing to the Platform API.

---

<div class="post-metadata">

**Author:** ![saleh1222](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@saleh1222](https://community.sendbird.com/u/saleh1222)\
**Post date:** [November 10, 2021, 3:11am UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/7 "2021-11-10T03:11:01Z")

</div>

I think I know what the problem was. There was another channel between the 2 users that was not distinct. Hence setting the other as distinct did not just go through. but when I deleted the other channel, I managed to set the channel as distinct. Did I figure it correctly? Thanks.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [November 10, 2021, 1:11pm UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/8 "2021-11-10T13:11:38Z")

</div>

Hi @saleh1222,

I’m happy to hear you were able to successfully create a distinct channel. The previously created non-distinct channel should not have impacted this issue. As a test, I just created two channels. The first was not distinct, and the second was. Both contained the same users. If possible, could you DM me your application id so I can take a quick peak at logging and just validate that nothing else was going on?

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [November 10, 2021, 2:16pm UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/9 "2021-11-10T14:16:32Z")

</div>

Hi @saleh1222,

Thank you for DMing me your application id. It looks like in all of your request, up until the successful channel, you were sending `_distinct` instead of `is_distinct`. Here is one of your requests:

```auto
{"user_ids":["[Masked Value]","[Masked Value]"],"name":"[Masked Value]","_distinct":true,"_public":false}

```

In your successful request, you sent the whole `is_distinct`:

```auto
{"is_public":false,"user_ids":["[Masked Value]","[Masked Value]"],"is_distinct":true}

```

---

<div class="post-metadata">

**Author:** ![saleh1222](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@saleh1222](https://community.sendbird.com/u/saleh1222)\
**Post date:** [November 10, 2021, 4:52pm UTC](https://community.sendbird.com/t/cannot-set-is-distinct-when-creating-a-group-channel/3348/10 "2021-11-10T16:52:09Z")

</div>

Oh, I see what happened there. thanks alot for looking into this.

Cheers.
