---
sidebar_position: 6
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get participant count
Gets the total number of chat participants
`Function GetParticipantCount(Val Token, Val ChatID) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Bot token |
| ChatID | --chat | String, Number | ✔ | Target chat ID |
Returns: Map Of KeyAndValue - serialized JSON response from Telegram
:::tip
Method at API documentation: [getChatMemberCount](https://core.telegram.org/bots/api#getchatmembercount)
:::
```bsl title="1C:Enterprise/OneScript code example"
Token = "6129457865:AAFyzNYOAFbu...";
ChannelID = "@testsichee";
Result = OPI_Telegram.GetParticipantCount(Token, ChannelID);
```
```bash
oint telegram GetParticipantCount \
--token "***" \
--chat "@testsichee"
```
```batch
oint telegram GetParticipantCount ^
--token "***" ^
--chat "@testsichee"
```
```json title="Result"
{
"ok": true,
"result": 2
}
```