Retrieve or search channel when user not a member of this channel

Hey there! How I can get a channel when I am not a member of this channel?
I try to use

const channel = await sb.groupChannel.getChannel(CHANNEL_URL);

and searching queries but if I understood correctly they return channels where I am a member.
My logic is I click on a button and I should be automatically entered (invited) to a specific channel, but before it, I need to check whether this channel is created or not. Could you help me, please?

Hello @NikShein,

A PublicGroupChannelListQuery instance provides several types of search filters such as ChannelNameContainsFilter and ChannelUrlsFilter . You can use these filters to search for specific public group channels.

To retrive both channels where the current user is and isn’t a member, set membershipFilter to ALL

Sample Code:

const params = {
  includeEmpty: true,
  channelNameContainsFilter: 'Sendbird',
  membershipFilter: MembershipFilter.ALL
const query = sb.groupChannel.createPublicGroupChannelListQuery(params);
const channels = await;