1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-15 11:56:36 +02:00
OpenIntegrations/docs/en/md/Slack/Channel-management/Get-channel-user-list.mdx
Vitaly the Alpaca (bot) 74bc9c33f0 Main build (Jenkins)
2024-12-09 15:33:55 +03:00

68 lines
1.4 KiB
Plaintext

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get channel user list
Gets a list of users in the specified channel
`Function GetChannelUserList(Val Token, Val Channel, Val Cursor = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| Channel | --channel | String | ✔ | Channel ID |
| Cursor | --cursor | String | ✖ | Pointer from the previous request, if the result rows > 100 |
Returns: Map Of KeyAndValue - serialized JSON response from Slack
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "xoxb-6965308400114-696804637...";
Channel = "C083U8DM3EK";
Result = OPI_Slack.GetChannelUserList(Token, Channel);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint slack GetChannelUserList \
--token "***" \
--channel "C083XGHNADA"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint slack GetChannelUserList ^
--token "***" ^
--channel "C083XGHNADA"
```
</TabItem>
</Tabs>
```json title="Result"
{
"ok": true,
"members": [
"U06UG1CAYH2"
],
"response_metadata": {
"next_cursor": ""
}
}
```