# How to get user's chat channels?

**URL:** <https://community.sendbird.com/t/how-to-get-users-chat-channels/4944>\
**Category:** JavaScript\
**Tags:** group-channel, react-js\
**Created:** [June 22, 2022, 7:03am UTC](https://community.sendbird.com/t/how-to-get-users-chat-channels/4944 "2022-06-22T07:03:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![C\_Gone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/c_gone/32/2687_2.png) [@C\_Gone](https://community.sendbird.com/u/C_Gone)\
**Post date:** [June 22, 2022, 7:03am UTC](https://community.sendbird.com/t/how-to-get-users-chat-channels/4944/1 "2022-06-22T07:03:31Z")

</div>

I want to get user’s chat channels list.

```javascript
const UserJoinedChannels = async () => {
    const sendbirdChat = await SendbirdChat.init({
      appId: APP_ID,
      localCacheEnabled: true,
    });

    await sendbirdChat.connect(props.userObj.email);
    console.log('sendbird connected!')
    const userUpdateParams = new UserUpdateParams();
    userUpdateParams.nickname = props.userObj.displayName;
    userUpdateParams.userId = props.userObj.email;
    await sendbirdChat.updateCurrentUserInfo(userUpdateParams);

    sb = sendbirdChat;
    updateState({ ...state });
    const [channels, error] = await loadChannels();
    if (error) {
      return onError(error);
    }
    updateState({ ...state, channels: channels });
    console.log(state);
  }

  const loadChannels = async () => {
    try {
        const groupChannelQuery = sb.groupChannel.createMyGroupChannelListQuery({ limit: 30, includeEmpty: true });
        const channels = await groupChannelQuery.next();
        return [channels, null];
    } catch (error) {
        return [null, error];
    }

  }

  const onError = (error) => {
    updateState({ ...state, error: error.message });
    console.log(error);
  }

```

I used that code, but I can’t get channels

---

<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:** [June 22, 2022, 8:03am UTC](https://community.sendbird.com/t/how-to-get-users-chat-channels/4944/2 "2022-06-22T08:03:17Z")

</div>

Hi @C_Gone,

Welcome to the Sendbird Community.

Can you tell me what version of the Sendbird SDK you’re utilizing?

---

<div class="post-metadata">

**Author:** ![C\_Gone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/c_gone/32/2687_2.png) [@C\_Gone](https://community.sendbird.com/u/C_Gone)\
**Post date:** [June 23, 2022, 12:46am UTC](https://community.sendbird.com/t/how-to-get-users-chat-channels/4944/3 "2022-06-23T00:46:45Z")

</div>

“@sendbird/chat”: “^4.0.0-beta.6”,  
“@sendbird/uikit-react”: “^3.0.0-beta.2”,  
“sendbird”: “^3.1.11”,  
“sendbird-uikit”: “^2.7.0”,

---

<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:** [June 23, 2022, 6:18am UTC](https://community.sendbird.com/t/how-to-get-users-chat-channels/4944/4 "2022-06-23T06:18:19Z")

</div>

Hi @C_Gone,

Is there any reason you’re combining multiple versions of both the UIKit and Core SDKS?
