2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Get channel list and other functions to work with Slack in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Slack]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get channel list
Gets a list of available channels
`Function GetChannelList(Val Token, Val ExcludeArchived = False, Val Cursor = "") Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| ExcludeArchived | --notarchived | Boolean | ✖ | Indicator of excluding archived channels |
| Cursor | --cursor | String | ✖ | Pointer from the previous request, if the result rows > 100 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Slack
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
Token = "xoxb-6965308400114-696804637...";
2024-10-15 10:16:04 +03:00
Result = OPI_Slack.GetChannelList(Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint slack GetChannelList \
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint slack GetChannelList ^
2024-10-22 08:59:24 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"ok": true,
"channels": [
{
"id": "C06UD92DF1Q",
2025-09-12 20:23:31 +03:00
"created": 1713202497,
"creator": "U06UABH3APP",
"is_org_shared": false,
"is_im": false,
"context_team_id": "T06UD92BS3C",
"updated": 1724394518358,
2024-10-15 10:16:04 +03:00
"name": "general",
2025-09-12 20:23:31 +03:00
"name_normalized": "general",
2024-10-15 10:16:04 +03:00
"is_channel": true,
"is_group": false,
"is_mpim": false,
"is_private": false,
"is_archived": false,
"is_general": true,
"is_shared": false,
2025-09-12 20:23:31 +03:00
"is_ext_shared": false,
"unlinked": 0,
2024-10-15 10:16:04 +03:00
"is_pending_ext_shared": false,
"pending_shared": [],
"parent_conversation": null,
"purpose": {
"value": "This is the one channel that will always include everyone. It’s a great spot for announcements and team-wide conversations.",
"creator": "U06UABH3APP",
"last_set": 1713202497
},
2025-09-12 20:23:31 +03:00
"topic": {
"value": "",
"creator": "",
"last_set": 0
},
"shared_team_ids": [
"T06UD92BS3C"
],
"pending_connected_team_ids": [],
"is_member": false,
"num_members": 1,
2024-10-15 10:16:04 +03:00
"properties": {
"use_case": "welcome"
},
2025-09-12 20:23:31 +03:00
"previous_names": []
2024-10-15 10:16:04 +03:00
},
{
"id": "C06UFNUTKUL",
2025-09-12 20:23:31 +03:00
"created": 1713202541,
"creator": "U06UABH3APP",
"is_org_shared": false,
"is_im": false,
"context_team_id": "T06UD92BS3C",
"updated": 1724394515808,
2024-10-15 10:16:04 +03:00
"name": "slack-api-librarry",
2025-09-12 20:23:31 +03:00
"name_normalized": "slack-api-librarry",
2024-10-15 10:16:04 +03:00
"is_channel": true,
"is_group": false,
"is_mpim": false,
"is_private": false,
"is_archived": false,
"is_general": false,
"is_shared": false,
2025-09-12 20:23:31 +03:00
"is_ext_shared": false,
"unlinked": 0,
2024-10-15 10:16:04 +03:00
"is_pending_ext_shared": false,
"pending_shared": [],
"parent_conversation": null,
"purpose": {
"value": "This channel is for everything #slack-api-librarry. Hold meetings, share docs, and make decisions together with your team.",
"creator": "U06UABH3APP",
"last_set": 1713202541
},
2025-09-12 20:23:31 +03:00
"topic": {
"value": "",
"creator": "",
"last_set": 0
},
"shared_team_ids": [
"T06UD92BS3C"
],
"pending_connected_team_ids": [],
"is_member": true,
"num_members": 2,
2024-10-15 10:16:04 +03:00
"properties": {
"tabs": [
{
"id": "files",
"label": "",
"type": "files"
}
],
2025-09-12 20:23:31 +03:00
"tabz": [
{
"type": "files"
}
],
2024-10-15 10:16:04 +03:00
"use_case": "project"
},
2025-09-12 20:23:31 +03:00
"previous_names": []
2024-10-15 10:16:04 +03:00
},
{
"id": "C06UW6XHU5V",
2025-09-12 20:23:31 +03:00
"created": 1713701752,
"creator": "U06UG1CAYH2",
"is_org_shared": false,
"is_im": false,
"context_team_id": "T06UD92BS3C",
"updated": 1724394515915,
2024-10-15 10:16:04 +03:00
"name": "testconvd9226ab3-0341-4abb-97c4-a185b7ace9e8",
2025-09-12 20:23:31 +03:00
"name_normalized": "testconvd9226ab3-0341-4abb-97c4-a185b7ace9e8",
2024-10-15 10:16:04 +03:00
"is_channel": true,
"is_group": false,
"is_mpim": false,
"is_private": false,
"is_archived": true,
"is_general": false,
"is_shared": false,
2025-09-12 20:23:31 +03:00
"is_ext_shared": false,
"unlinked": 0,
2024-10-15 10:16:04 +03:00
"is_pending_ext_shared": false,
"pending_shared": [],
"parent_conversation": null,
2025-09-12 20:23:31 +03:00
"purpose": {
2024-10-15 10:16:04 +03:00
"value": "",
"creator": "",
"last_set": 0
},
2025-09-12 20:23:31 +03:00
"topic": {
2024-10-15 10:16:04 +03:00
"value": "",
"creator": "",
"last_set": 0
},
2025-09-12 20:23:31 +03:00
"shared_team_ids": [
"T06UD92BS3C"
],
"pending_connected_team_ids": [],
"is_member": false,
"num_members": 0,
"previous_names": []
2024-10-15 10:16:04 +03:00
},
{
"id": "C06UWD6523Z",
"created": 1713712534,
2025-09-12 20:23:31 +03:00
"creator": "U06UG1CAYH2",
"is_org_shared": false,
"is_im": false,
"context_team_id": "T06UD92BS3C",
"updated": 1724394515846,
"name": "testconvdfd146d0-f8c0-4e9f-9df8-56cc13c7e1dc",
2024-10-15 10:16:04 +03:00
...
```