# Get Channels

SDK now supports querying channels based on provided channel IDs. The `ChannelRepository` class includes a `getChannels` method that takes an array of channel IDs as input and returns a live collection of channels. This live collection will contain all the channels that are being queried in the first page. This live collection will not support pagination.

Any update to the channels present in this live collection will be automatically notified to the user. Furthermore,

* This live collection will only contain valid channels. In case of invalid channels (such as user gets banned etc.) the list may exclude those channels.
* If any channel id is invalid, live collection will throw error.

{% hint style="info" %}
💡 The maximum number of channel that can be queried is 100.
{% endhint %}

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/d1e815829343ff614437fc381d3ab56c>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/c91b1fb9681e4d9706ace0ec2278478e>" %}
{% endtab %}
{% endtabs %}

**Limitations:**

If the channel is not public and user leaves the channel, the channel will still remain in the live collection until user refresh or resets the live collection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-sdk/chat/channels/get-channels.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
