# ListChannels

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.Slack/tree/main/Frends.Slack.ListChannels>

{% tabs %}
{% tab title="Parameter: Connection" %}

| Name               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🗝Token : `String` | <p>Slack OAuth token used for authentication.</p><p>If the token is a bot token (starts with "xoxb"), messages</p><p>will be updated as the Slack app's bot user.</p><p>If the token is a user token (starts with "xoxp"), messages</p><p>will be updated as the Slack user who authorized the token.</p><p>The token owner must be the original message poster</p><p>or have appropriate permissions to edit the message.</p><p>Note: User tokens require the user to have authorized the app via OAuth</p><p>with appropriate scopes (e.g., "chat:write").</p><p><br>Default: <code>-</code><br>Example: <code>xoxb-123456789</code></p> |
| {% endtab %}       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                                                                                                                                                                  |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ExcludeArchived : `Boolean`      | <p>Whether to omit archived channels.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                 |
| Limit : `Int32`                  | <p>Number of channels to return.</p><p><br>Default: <code>100</code><br>Example: <code>100</code></p>                                                                                                                                                                                                        |
| Cursor : `String`                | <p>A pagination cursor used to continue listing channels from where the previous ListChannels task execution stopped.</p><p>Set this to the NextCursor value returned in the previous result to fetch the next batch of channels.</p><p><br>Default: <code>-</code><br>Example: <code>e3VzZXI6...</code></p> |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>                                                                                                                                                                                             |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                                                                                                                                                                               |
| {% endtab %}                     |                                                                                                                                                                                                                                                                                                              |

{% tab title="Result: Result" %}

| Name                       | Description                                                                                                                                                                                                                              |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`        | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                                                                                                                                       |
| Channels : `List<Channel>` | <p>List of channels retrieved from the Slack workspace. Each channel includes its ID, name, and archive status.<br>Example: <code>{ "Id": "C01234567", "Name": "general", "IsArchived": true }</code></p>                                |
| HasMore : `Boolean`        | <p>Indicates whether more channels are available for pagination. If true, additional requests using a cursor may return more channels.<br>Example: <code>true</code></p>                                                                 |
| NextCursor : `String`      | <p>A pagination token to continue listing more channels. Use this value in the next execution of the ListChannels task to continue retrieving channels from where the previous execution ended.<br>Example: <code>dGVhbTpD...</code></p> |
| Error : `Error`            | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, object { Exception Exception } AdditionalInfo }</code></p>                                                                                      |
| {% endtab %}               |                                                                                                                                                                                                                                          |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2025-08-01

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
